diff options
author | Kostya Serebryany <kcc@google.com> | 2012-07-20 09:54:50 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2012-07-20 09:54:50 +0000 |
commit | f7b08226eb44458f6f38cbeaca527028803c725a (patch) | |
tree | 25e1016fc56bc45a0f37f1dc5843d1397c211cb8 /test/Instrumentation | |
parent | f654554ee0693770308e187df9d411c8a51bebde (diff) | |
download | external_llvm-f7b08226eb44458f6f38cbeaca527028803c725a.zip external_llvm-f7b08226eb44458f6f38cbeaca527028803c725a.tar.gz external_llvm-f7b08226eb44458f6f38cbeaca527028803c725a.tar.bz2 |
[asan] make sure that the crash callbacks do not get merged (Chandler's idea: insert an empty InlineAsm). Change the order in which the new BBs are inserted: the slow path BB is insert between old BBs, the crash BB is inserted at the end. Don't create an empty BB (introduced by recent commits). Update the test. The experimental code that does manual crash callback merge will most likely be deleted later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160544 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Instrumentation')
-rw-r--r-- | test/Instrumentation/AddressSanitizer/basic.ll | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/test/Instrumentation/AddressSanitizer/basic.ll b/test/Instrumentation/AddressSanitizer/basic.ll index 183cddc..294ca8a 100644 --- a/test/Instrumentation/AddressSanitizer/basic.ll +++ b/test/Instrumentation/AddressSanitizer/basic.ll @@ -16,15 +16,6 @@ define i32 @test_load(i32* %a) address_safety { ; CHECK: icmp ne i8 ; CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}} ; -; The actual load comes next because ASan adds the last instrumentation block -; 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 ; CHECK: add i64 %{{.*}}, 3 @@ -32,6 +23,16 @@ define i32 @test_load(i32* %a) address_safety { ; CHECK: icmp sge i8 %{{.*}}, %[[LOAD_SHADOW]] ; CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}} ; +; The actual load comes next because ASan adds the crash block +; 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]]) +; CHECK: unreachable +; + entry: %tmp1 = load i32* %a @@ -49,15 +50,6 @@ define void @test_store(i32* %a) address_safety { ; CHECK: icmp ne i8 ; CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}} ; -; The actual store comes next because ASan adds the last instrumentation block -; to the end of the function. -; 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 @@ -65,6 +57,15 @@ define void @test_store(i32* %a) address_safety { ; CHECK: icmp sge i8 %{{.*}}, %[[STORE_SHADOW]] ; CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}} ; +; The actual load comes next because ASan adds the crash block +; to the end of the function. +; CHECK: store i32 42, i32* %a +; CHECK: ret void +; +; The crash block reports the error. +; CHECK: call void @__asan_report_store4(i64 %[[STORE_ADDR]]) +; CHECK: unreachable +; entry: store i32 42, i32* %a |