1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00
llvm-mirror/lib/Transforms
Alexey Samsonov 036373fe61 [ASan] Print exact source location of global variables in error reports.
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.

llvm-svn: 212188
2014-07-02 16:54:41 +00:00
..
Hello [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 02:55:47 +00:00
InstCombine InstCombine: Optimize x/INT_MIN to x==INT_MIN 2014-07-02 06:42:13 +00:00
Instrumentation [ASan] Print exact source location of global variables in error reports. 2014-07-02 16:54:41 +00:00
IPO DebugInfo: Keep track of subprograms who's arguments have been promoted. 2014-07-01 21:13:37 +00:00
ObjCARC Revert "Introduce a string_ostream string builder facilty" 2014-06-26 22:52:05 +00:00
Scalar GVN: Preserve invariant.load metadata 2014-06-26 19:51:19 +00:00
Utils DebugInfo: Preserve debug location information when transforming a call into an invoke during inlining. 2014-06-30 20:30:39 +00:00
Vectorize Revert "Introduce a string_ostream string builder facilty" 2014-06-26 22:52:05 +00:00
CMakeLists.txt Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation for refactoring the ARC Optimizer. 2013-01-28 01:35:51 +00:00
LLVMBuild.txt Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation for refactoring the ARC Optimizer. 2013-01-28 01:35:51 +00:00
Makefile Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation for refactoring the ARC Optimizer. 2013-01-28 01:35:51 +00:00