diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2013-08-22 20:08:08 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2013-08-22 20:08:08 +0000 |
commit | f1366c552480f7c6b2b46b03e19bb798b3a47c66 (patch) | |
tree | 5277472cc316f2be70f568db1eca3074927ce6f3 /test/Instrumentation/DataFlowSanitizer/store.ll | |
parent | 094637408b806bb17c02daba2027f39eb73bb98a (diff) | |
download | external_llvm-f1366c552480f7c6b2b46b03e19bb798b3a47c66.zip external_llvm-f1366c552480f7c6b2b46b03e19bb798b3a47c66.tar.gz external_llvm-f1366c552480f7c6b2b46b03e19bb798b3a47c66.tar.bz2 |
DataFlowSanitizer: Prefix the name of each instrumented function with "dfs$".
DFSan changes the ABI of each function in the module. This makes it possible
for a function with the native ABI to be called with the instrumented ABI,
or vice versa, thus possibly invoking undefined behavior. A simple way
of statically detecting instances of this problem is to prepend the prefix
"dfs$" to the name of each instrumented-ABI function.
This will not catch every such problem; in particular function pointers passed
across the instrumented-native barrier cannot be used on the other side.
These problems could potentially be caught dynamically.
Differential Revision: http://llvm-reviews.chandlerc.com/D1373
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189052 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Instrumentation/DataFlowSanitizer/store.ll')
-rw-r--r-- | test/Instrumentation/DataFlowSanitizer/store.ll | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/Instrumentation/DataFlowSanitizer/store.ll b/test/Instrumentation/DataFlowSanitizer/store.ll index 0c0aa49..9509177 100644 --- a/test/Instrumentation/DataFlowSanitizer/store.ll +++ b/test/Instrumentation/DataFlowSanitizer/store.ll @@ -2,7 +2,7 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" define void @store8(i8 %v, i8* %p) { - ; CHECK: @store8 + ; CHECK: @"dfs$store8" ; CHECK: load{{.*}}__dfsan_arg_tls ; CHECK: ptrtoint ; CHECK: and @@ -16,7 +16,7 @@ define void @store8(i8 %v, i8* %p) { } define void @store16(i16 %v, i16* %p) { - ; CHECK: @store16 + ; CHECK: @"dfs$store16" ; CHECK: load{{.*}}__dfsan_arg_tls ; CHECK: ptrtoint ; CHECK: and @@ -32,7 +32,7 @@ define void @store16(i16 %v, i16* %p) { } define void @store32(i32 %v, i32* %p) { - ; CHECK: @store32 + ; CHECK: @"dfs$store32" ; CHECK: load{{.*}}__dfsan_arg_tls ; CHECK: ptrtoint ; CHECK: and @@ -52,7 +52,7 @@ define void @store32(i32 %v, i32* %p) { } define void @store64(i64 %v, i64* %p) { - ; CHECK: @store64 + ; CHECK: @"dfs$store64" ; CHECK: load{{.*}}__dfsan_arg_tls ; CHECK: ptrtoint ; CHECK: and |