summaryrefslogtreecommitdiff
path: root/test/asan/TestCases/global-location.cc
AgeCommit message (Collapse)Author
2014-07-14[asan] Remove XFAIL:android from 2 newly passing tests.Evgeniy Stepanov
Fixed in r212872. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@212926 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-12[ASan] Collect unmangled names of global variables in Clang to print them in ↵Alexey Samsonov
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
2014-07-02XFAIL test on Android (this is a known issue)Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@212211 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-02[ASan] Print exact source location of global variables in error reports.Alexey Samsonov
See https://code.google.com/p/address-sanitizer/issues/detail?id=299 for the original feature request. Introduce llvm.asan.globals metadata, which Clang (or any other frontend) may use to report extra information about global variables to ASan instrumentation pass in the backend. This metadata replaces llvm.asan.dynamically_initialized_globals that was used to detect init-order bugs. llvm.asan.globals contains the following data for each global: 1) source location (file/line/column info); 2) whether it is dynamically initialized; 3) whether it is blacklisted (shouldn't be instrumented). Source location data is then emitted in the binary and can be picked up by ASan runtime in case it needs to print error report involving some global. For example: 0x... is located 4 bytes to the right of global variable 'C::array' defined in '/path/to/file:17:8' (0x...) of size 40 These source locations are printed even if the binary doesn't have any debug info. This is an ABI-breaking change. ASan initialization is renamed to __asan_init_v4(). Pre-built libraries compiled with older Clang will not work with the fresh runtime. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@212188 91177308-0d34-0410-b5e6-96231b3b80d8