bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

libbfd and/or libopcodes not reentrant


From: Jonas Maebe
Subject: libbfd and/or libopcodes not reentrant
Date: Tue, 12 Mar 2002 12:52:14 +0100

Hello,

Under "general BFD programming guidelines" in "binutils/bfd/bfdint.texi", it is stated that the goal is to make sure libbfd is fully reentrant. It is nowhere stated that isn't currently the case, but it definitely isn't (or libopcodes isn't). On a multi-processor machine, the attached program will reliably crash with a segfault or get stuck in andless loop (on single processor machines it also crashes sometimes, but it's much harder to reproduce then). I'm using libbfd and libopcodes from binutils-2.11.94 and libpthread-0.9 (the former 2 statically linked, the latter dynamically) on a Linux i386 machine with kernel version 2.4.9-31 (SMP kernel).

In the program where I really use this routine, I can verify that by putting spinlocks round the calls to the print_ins_i386 calls, the segfaults disappear.

If you need any more info, please let me know.

Thanks,


Jonas

PS: I compile the attached program with "gcc -o info info.c ../../binutils-2.11.94/bfd/libbfd.a ../../binutils-2.11.94/opcodes/libopcodes.a -lpthread"

Attachment: info.c
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]