[PATCH] D67738: [lsan] Fix deadlock in dl_iterate_phdr.
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 18 16:04:31 PDT 2019
eugenis created this revision.
eugenis added reviewers: vitalybuka, hctim.
Herald added subscribers: Sanitizers, jfb.
Herald added projects: Sanitizers, LLVM.
Do not grab the allocator lock before calling dl_iterate_phdr. This may
cause a lock order inversion with (valid) user code that uses malloc
inside a dl_iterate_phdr callback.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D67738
Files:
compiler-rt/lib/lsan/lsan_common.cpp
compiler-rt/lib/lsan/lsan_common.h
compiler-rt/lib/lsan/lsan_common_linux.cpp
compiler-rt/lib/lsan/lsan_common_mac.cpp
compiler-rt/test/lsan/TestCases/Linux/libdl_deadlock.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67738.220766.patch
Type: text/x-patch
Size: 4784 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190918/9cfd7dca/attachment.bin>
More information about the llvm-commits
mailing list