libbacktrace patch committed: Fix threaded race
Ian Lance Taylor
iant@google.com
Thu Jan 31 18:32:00 GMT 2013
Using libbacktrace more extensively from Go has revealed a race
condition in libbacktrace. I cleverly save some memory by reusing a
vector in the DWARF data structure. However, that is fairly hard to do
if multiple threads are simultaneously getting a backtrace. This patch
changes the code to always use a new vector when threaded. This will
introduce additional memory fragmentation, but that seems impossible to
avoid. Bootstrapped and ran libbacktrace and Go testsuite on
x86_64-unknown-linux-gnu. Committed to mainline.
Ian
2013-01-31 Ian Lance Taylor <iant@google.com>
* dwarf.c (read_function_info): Permit fvec parameter to be NULL.
(dwarf_lookup_pc): Don't use ddata->fvec if threaded.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-diff
Size: 2517 bytes
Desc: patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20130131/715c25ce/attachment.bin>
More information about the Gcc-patches
mailing list