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.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Paths
| Differential D67738
[lsan] Fix deadlock in dl_iterate_phdr. ClosedPublic Authored by eugenis on Sep 18 2019, 3:56 PM.
Details Summary Do not grab the allocator lock before calling dl_iterate_phdr. This may
Diff Detail
Event TimelineHerald added projects: Restricted Project, Restricted Project. · View Herald TranscriptSep 18 2019, 3:56 PM hctim added inline comments. This revision is now accepted and ready to land.Sep 18 2019, 6:41 PM Closed by commit rL372348: [lsan] Fix deadlock in dl_iterate_phdr. (authored by eugenis). · Explain WhySep 19 2019, 12:52 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 220898 compiler-rt/trunk/lib/lsan/lsan_common.h
compiler-rt/trunk/lib/lsan/lsan_common.cpp
compiler-rt/trunk/lib/lsan/lsan_common_linux.cpp
compiler-rt/trunk/lib/lsan/lsan_common_mac.cpp
compiler-rt/trunk/test/lsan/TestCases/Linux/libdl_deadlock.cpp
|