[TSan] Don't strip binary/library name until the moment we print it.
authorAlexey Samsonov <vonosmas@gmail.com>
Tue, 4 Nov 2014 01:55:20 +0000 (01:55 +0000)
committerAlexey Samsonov <vonosmas@gmail.com>
Tue, 4 Nov 2014 01:55:20 +0000 (01:55 +0000)
commit8f1632d5c1e32912365f5673d832e0e8c8080a89
tree3dd6a6318d3bdb5ff6945da5a6abdd9dfc6015b9
parent49c541a7549eef84e5f046ba5d73906f27eef43d
[TSan] Don't strip binary/library name until the moment we print it.

This commit changes the place where TSan runtime turns full path
to binary or shared library into its basename
(/usr/foo/mybinary -> mybinary). Instead of doing it as early as possible
(when we obtained the full path from the symbolizer), we now do it as
late as possible (right before printing the error report).

This seems like a right thing to do - stripping to basename is a detail
of report formatting implementation, and should belong there. Also, we
might need the full path at some point - for example, to match the
suppressions.

llvm-svn: 221225
compiler-rt/lib/tsan/rtl/tsan_report.cc
compiler-rt/lib/tsan/rtl/tsan_symbolize.cc
compiler-rt/test/tsan/global_race.cc
compiler-rt/test/tsan/simple_stack2.cc