[PATCH] D14608: [tsan] Allow symbolizers that don't obtain global symbol sizes
Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 12 06:36:55 PST 2015
This revision was automatically updated to reflect the committed changes.
Closed by commit rL252896: [tsan] Allow symbolizers that don't obtain global symbol sizes (authored by kuba.brecka).
Changed prior to commit:
http://reviews.llvm.org/D14608?vs=40028&id=40043#toc
Repository:
rL LLVM
http://reviews.llvm.org/D14608
Files:
compiler-rt/trunk/lib/tsan/rtl/tsan_report.cc
compiler-rt/trunk/test/tsan/global_race.cc
compiler-rt/trunk/test/tsan/global_race2.cc
compiler-rt/trunk/test/tsan/global_race3.cc
Index: compiler-rt/trunk/test/tsan/global_race.cc
===================================================================
--- compiler-rt/trunk/test/tsan/global_race.cc
+++ compiler-rt/trunk/test/tsan/global_race.cc
@@ -23,5 +23,5 @@
// CHECK: addr=[[ADDR:0x[0-9,a-f]+]]
// CHECK: WARNING: ThreadSanitizer: data race
-// CHECK: Location is global 'GlobalData' of size 40 at [[ADDR]] (global_race.cc.exe+0x{{[0-9,a-f]+}})
+// CHECK: Location is global 'GlobalData' {{(of size 40 )?}}at [[ADDR]] (global_race.cc.exe+0x{{[0-9,a-f]+}})
Index: compiler-rt/trunk/test/tsan/global_race3.cc
===================================================================
--- compiler-rt/trunk/test/tsan/global_race3.cc
+++ compiler-rt/trunk/test/tsan/global_race3.cc
@@ -28,4 +28,4 @@
// CHECK: addr3=[[ADDR3:0x[0-9,a-f]+]]
// CHECK: WARNING: ThreadSanitizer: data race
-// CHECK: Location is global 'XXX::YYY::ZZZ' of size 40 at [[ADDR3]] ({{.*}}+0x{{[0-9,a-f]+}})
+// CHECK: Location is global 'XXX::YYY::ZZZ' {{(of size 40 )?}}at [[ADDR3]] ({{.*}}+0x{{[0-9,a-f]+}})
Index: compiler-rt/trunk/test/tsan/global_race2.cc
===================================================================
--- compiler-rt/trunk/test/tsan/global_race2.cc
+++ compiler-rt/trunk/test/tsan/global_race2.cc
@@ -23,5 +23,5 @@
// CHECK: addr2=[[ADDR2:0x[0-9,a-f]+]]
// CHECK: WARNING: ThreadSanitizer: data race
-// CHECK: Location is global 'x' of size 4 at [[ADDR2]] ({{.*}}+0x{{[0-9,a-f]+}})
+// CHECK: Location is global 'x' {{(of size 4 )?}}at [[ADDR2]] ({{.*}}+0x{{[0-9,a-f]+}})
Index: compiler-rt/trunk/lib/tsan/rtl/tsan_report.cc
===================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_report.cc
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_report.cc
@@ -171,9 +171,14 @@
Printf("%s", d.Location());
if (loc->type == ReportLocationGlobal) {
const DataInfo &global = loc->global;
- Printf(" Location is global '%s' of size %zu at %p (%s+%p)\n\n",
- global.name, global.size, global.start,
- StripModuleName(global.module), global.module_offset);
+ if (global.size != 0)
+ Printf(" Location is global '%s' of size %zu at %p (%s+%p)\n\n",
+ global.name, global.size, global.start,
+ StripModuleName(global.module), global.module_offset);
+ else
+ Printf(" Location is global '%s' at %p (%s+%p)\n\n", global.name,
+ global.start, StripModuleName(global.module),
+ global.module_offset);
} else if (loc->type == ReportLocationHeap) {
char thrbuf[kThreadBufSize];
Printf(" Location is heap block of size %zu at %p allocated by %s:\n",
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14608.40043.patch
Type: text/x-patch
Size: 2666 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151112/e1979d72/attachment.bin>
More information about the llvm-commits
mailing list