[PATCH] libdw: add thread-safety to dwarf_getabbrev()
Mon Aug 26 13:18:00 GMT 2019
Thanks for checking our new mailinglist settings :)
You message was accepted now and the HTML attachment stripped.
On Sun, 2019-08-25 at 20:24 -0500, Jonathon Anderson wrote:
> The one extra line in dwarf_getcfi.c
> is to account for a failure in the test suite when Valgrind is
> enabled (didn't catch it the first time around).
That is an interesting catch. And obviously a latent bug. It works if
things are in the first memblock (as part of the larger Dwarf struct),
since that is allocated with calloc, and so zeroed out. But if the cfi
would get into a later memblock it would get a random value, since
those are malloced. In your patch the memblocks are always malloced,
and so the bug shows up immediately.
Lets just cherry-pick this fixup since it is a good fixup to have.
Does the attached look correct?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1223 bytes
Desc: not available
More information about the Elfutils-devel