[PATCH] opcodes/i386-dis.c is not thread-safe
Jan Beulich
jbeulich@suse.com
Fri Dec 17 07:24:29 GMT 2021
On 16.12.2021 23:26, Vladimir Mezentsev via Binutils wrote:
> From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
>
> We plan to use print_insn_i386_att, print_insn_i386_intel and
> print_insn_i386 in a multithreaded application.
> These functions are not thread safe due to the use of static variables.
>
> A disassembly output is changed due to fixes in swap_operand().
> The old swap_operand() did not cleanup mnemonicendp.
>
> Tested on x86_64-pc-linux-gnu.
Looks plausible at the first glance, but it would be quite helpful if this
was split up some. At the very least the fix to swap_operand() should be
a separate prereq change, imo.
Jan
More information about the Binutils
mailing list