diff options
author | Kostya Serebryany <kcc@google.com> | 2012-07-16 16:15:40 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2012-07-16 16:15:40 +0000 |
commit | c0ed3e548c6f688e22685de04e210c7b59ac3433 (patch) | |
tree | 975d3cf48d5f03ab25291b04e0c7c581e36865c2 /test/Instrumentation/AddressSanitizer/basic.ll | |
parent | 4a4d533fa77ffa21eb151d6a884269979de91851 (diff) |
[asan] refactor instrumentation to allow merging the crash callbacks (not fully implemented yet, no functionality change except the BB order)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160284 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Instrumentation/AddressSanitizer/basic.ll')
-rw-r--r-- | test/Instrumentation/AddressSanitizer/basic.ll | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/test/Instrumentation/AddressSanitizer/basic.ll b/test/Instrumentation/AddressSanitizer/basic.ll index e80cfeef12..183cddcb5c 100644 --- a/test/Instrumentation/AddressSanitizer/basic.ll +++ b/test/Instrumentation/AddressSanitizer/basic.ll @@ -20,6 +20,10 @@ define i32 @test_load(i32* %a) address_safety { ; to the end of the function. ; CHECK: %tmp1 = load i32* %a ; CHECK: ret i32 %tmp1 + +; The crash block reports the error. +; CHECK: call void @__asan_report_load4(i64 %[[LOAD_ADDR]]) noreturn +; CHECK: unreachable ; ; First instrumentation block refines the shadow test. ; CHECK: and i64 %[[LOAD_ADDR]], 7 @@ -28,9 +32,6 @@ define i32 @test_load(i32* %a) address_safety { ; CHECK: icmp sge i8 %{{.*}}, %[[LOAD_SHADOW]] ; CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}} ; -; Final instrumentation block reports the error. -; CHECK: call void @__asan_report_load4(i64 %[[LOAD_ADDR]]) noreturn -; CHECK: unreachable entry: %tmp1 = load i32* %a @@ -53,6 +54,10 @@ define void @test_store(i32* %a) address_safety { ; CHECK: store i32 42, i32* %a ; CHECK: ret void ; +; The crash block reports the error. +; CHECK: call void @__asan_report_store4(i64 %[[STORE_ADDR]]) noreturn +; CHECK: unreachable +; ; First instrumentation block refines the shadow test. ; CHECK: and i64 %[[STORE_ADDR]], 7 ; CHECK: add i64 %{{.*}}, 3 @@ -60,9 +65,6 @@ define void @test_store(i32* %a) address_safety { ; CHECK: icmp sge i8 %{{.*}}, %[[STORE_SHADOW]] ; CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}} ; -; Final instrumentation block reports the error. -; CHECK: call void @__asan_report_store4(i64 %[[STORE_ADDR]]) noreturn -; CHECK: unreachable entry: store i32 42, i32* %a |