]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Temporarily disable libunwind's FrameHeaderCache, until there is a
authordim <dim@FreeBSD.org>
Sat, 15 Aug 2020 22:58:07 +0000 (22:58 +0000)
committerdim <dim@FreeBSD.org>
Sat, 15 Aug 2020 22:58:07 +0000 (22:58 +0000)
commita362d17ff61d5a38054b988f166f6e4126344ee0
treeaacec294ed2a72a145f9c317ab2e06a087e22d68
parent2977352efc749df537dbb6c547795f40fc982439
Temporarily disable libunwind's FrameHeaderCache, until there is a
resolution for <https://bugs.llvm.org/show_bug.cgi?id=47181>.

The cache implementation depends on dl_iterate_phdr(3) ensuring that its
callbacks are not called simultaneously for multiple threads, but that
is only the case for the dl_iterate_phdr() implementation in rtld.

In a statically linked executable, libc's dl_iterate_phdr() is used,
which does no such locking. If multiple threads then call into the
unwinder at the same time, it is possible to trigger a segfault.

In particular, the statically linked lld which is built during the
cross-tools stage can segfault in this way, because it starts multiple
worker threads that can exit in parallel. Since our pthread_exit(3)
invokes the unwinder, it will therefore call into it in parallel too.
contrib/llvm-project/libunwind/src/AddressSpace.hpp