summaryrefslogtreecommitdiff
path: root/test/asan/TestCases/global-location.cc
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2014-07-12 00:42:52 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2014-07-12 00:42:52 +0000
commit4bc3d2f1b8539c01f9fda124764451720af65b56 (patch)
tree4860ed1a0278fcdb5f0ae9b31ab68f608e4675db /test/asan/TestCases/global-location.cc
parent8a017a0ac65a43aae8a267af9803022a268e46ce (diff)
downloadcompiler-rt-4bc3d2f1b8539c01f9fda124764451720af65b56.tar.gz
[ASan] Collect unmangled names of global variables in Clang to print them in error reports.
Currently ASan instrumentation pass creates a string with global name for each instrumented global (to include global names in the error report). Global name is already mangled at this point, and we may not be able to demangle it at runtime (e.g. there is no __cxa_demangle on Android). Instead, create a string with fully qualified global name in Clang, and pass it to ASan instrumentation pass in llvm.asan.globals metadata. If there is no metadata for some global, ASan will use the original algorithm. This fixes https://code.google.com/p/address-sanitizer/issues/detail?id=264. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@212872 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/asan/TestCases/global-location.cc')
-rw-r--r--test/asan/TestCases/global-location.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/asan/TestCases/global-location.cc b/test/asan/TestCases/global-location.cc
index 54f205593..2f72bede4 100644
--- a/test/asan/TestCases/global-location.cc
+++ b/test/asan/TestCases/global-location.cc
@@ -27,7 +27,7 @@ int main(int argc, char **argv) {
case 'c': return C::array[one * 11];
case 'f':
static int array[10];
- // FUNC_STATIC: 0x{{.*}} is located 4 bytes to the right of global variable 'main::array' defined in '{{.*}}global-location.cc:[[@LINE-1]]:16' {{.*}} of size 40
+ // FUNC_STATIC: 0x{{.*}} is located 4 bytes to the right of global variable 'array' defined in '{{.*}}global-location.cc:[[@LINE-1]]:16' {{.*}} of size 40
memset(array, 0, 10);
return array[one * 11];
case 'l':