LSan: fix a deadlock caused by dl_iterate_phdr().
authorSergey Matveev <earthdok@google.com>
Thu, 26 Feb 2015 14:01:08 +0000 (14:01 +0000)
committerSergey Matveev <earthdok@google.com>
Thu, 26 Feb 2015 14:01:08 +0000 (14:01 +0000)
commitc9b2cd5c8c3ba161119171145d21e4604aaf770c
tree516e44918c038ffa40d4b45f5530555bc7788164
parent48fd3f62b964103f22031daed6e44970209a3372
LSan: fix a deadlock caused by dl_iterate_phdr().

Wrap the StopTheWorld call in a dl_iterate_phdr() callback. This ensures that no
other threads are holding the libdl lock, and we can safely reenter it in the
tracer thread.

llvm-svn: 230631
compiler-rt/lib/lsan/lsan_common.cc
compiler-rt/lib/lsan/lsan_common.h
compiler-rt/lib/lsan/lsan_common_linux.cc