svn commit: r310025 - head/libexec/rtld-elf

Conrad Meyer cem at freebsd.org
Tue Dec 13 21:16:41 UTC 2016


On Tue, Dec 13, 2016 at 12:51 PM, Andriy Gapon <avg at freebsd.org> wrote:
> On 13/12/2016 20:05, Bryan Drewery wrote:
>> Author: bdrewery
>> Date: Tue Dec 13 18:05:14 2016
>> New Revision: 310025
>> URL: https://svnweb.freebsd.org/changeset/base/310025
>>
>> Log:
>>   Take write lock for rtld_bind before modifying obj_list in dl_iterate_phdr().
>
> What are typical callers of dl_iterate_phdr() ?

libunwind::UnwindCursor<libunwind::LocalAddressSpace,
libunwind::Registers_x86_64>::setInfoBasedOnIPRegister(bool) via
_pthread_exit.

> In what scenarios this bug would typically be hit?
> Thank you!

We mostly hit this during multi-threaded program teardown.  Exiting
threads would be in _pthread_exit -> libunwind -> dl_iterate_phdr at
the same time as the main thread was performing __cxa_finalize ->
_rtld_addr_phdr -> obj_from_addr.

Best,
Conrad


More information about the svn-src-all mailing list