1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
llvm-mirror/lib/Transforms/Instrumentation
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
..
AddressSanitizer.cpp [ASan] Print exact source location of global variables in error reports. 2014-07-02 16:54:41 +00:00
BoundsChecking.cpp [C++] Use 'nullptr'. Transforms edition. 2014-04-25 05:29:35 +00:00
CMakeLists.txt Remove lib/Transforms/Instrumentation/ProfilingUtils.* 2013-10-14 16:46:46 +00:00
DataFlowSanitizer.cpp Delete getAliasedGlobal. 2014-05-16 22:37:03 +00:00
DebugIR.cpp Revert "Introduce a string_ostream string builder facilty" 2014-06-26 22:52:05 +00:00
DebugIR.h [C++] Use 'nullptr'. Transforms edition. 2014-04-25 05:29:35 +00:00
GCOVProfiling.cpp Revert "Introduce a string_ostream string builder facilty" 2014-06-26 22:52:05 +00:00
Instrumentation.cpp Re-sort all of the includes with ./utils/sort_includes.py so that 2014-01-07 11:48:04 +00:00
LLVMBuild.txt Add proper dependencies to LLVMBuild.txt in llvm/lib. 2013-12-10 05:39:34 +00:00
Makefile
MaximumSpanningTree.h Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
MemorySanitizer.cpp msan: Stop stripping the 'tail' modifier off of calls 2014-06-30 20:12:27 +00:00
ThreadSanitizer.cpp IR: add "cmpxchg weak" variant to support permitted failure. 2014-06-13 14:24:07 +00:00