tsan: switch libignore from /proc/self/maps to dl_iterate_phdr
authorDmitry Vyukov <dvyukov@google.com>
Tue, 22 Nov 2016 09:49:11 +0000 (09:49 +0000)
committerDmitry Vyukov <dvyukov@google.com>
Tue, 22 Nov 2016 09:49:11 +0000 (09:49 +0000)
commit5c5d4766f8606ffbdc7589197c9a11d3d1ea5906
treef9b3bd89c273c10ae050d00c14130997f1e81e10
parent99a318e11220f733e8bae8cb8417862ac979f7ea
tsan: switch libignore from /proc/self/maps to dl_iterate_phdr

/proc/self/maps can't be read atomically, this leads to episodic
crashes in libignore as it thinks that a module is loaded twice.
See the new test for an example.
dl_iterate_phdr does not have this problem.
Switch libignore to dl_iterate_phdr.

llvm-svn: 287632
compiler-rt/lib/sanitizer_common/sanitizer_libignore.cc
compiler-rt/test/tsan/ignore_lib5.cc [new file with mode: 0644]
compiler-rt/test/tsan/ignore_lib5.cc.supp [new file with mode: 0644]