diff options
author | Vitaly Buka <vitalybuka@google.com> | 2016-08-18 18:17:19 +0000 |
---|---|---|
committer | Vitaly Buka <vitalybuka@google.com> | 2016-08-18 18:17:19 +0000 |
commit | 0596387ad37ec3e9c15f3f22b5341901e1b002fc (patch) | |
tree | de55bf643bdc82abc485f2722193df674f8be5c6 | |
parent | 3efaaeb79dc1f4b9206c6e573ab125ce1613a560 (diff) | |
download | bcm5719-llvm-0596387ad37ec3e9c15f3f22b5341901e1b002fc.tar.gz bcm5719-llvm-0596387ad37ec3e9c15f3f22b5341901e1b002fc.zip |
[asan] Extend test
Summary: PR27453
Reviewers: eugenis
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D23647
llvm-svn: 279109
-rw-r--r-- | llvm/test/Instrumentation/AddressSanitizer/stack-poisoning.ll | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/llvm/test/Instrumentation/AddressSanitizer/stack-poisoning.ll b/llvm/test/Instrumentation/AddressSanitizer/stack-poisoning.ll index 0c9ffe2d18f..4823cdff289 100644 --- a/llvm/test/Instrumentation/AddressSanitizer/stack-poisoning.ll +++ b/llvm/test/Instrumentation/AddressSanitizer/stack-poisoning.ll @@ -14,19 +14,43 @@ entry: ; CHECK-UAR-LABEL: Bar ; CHECK-UAR: load i32, i32* @__asan_option_detect_stack_use_after_return ; CHECK-UAR: label -; CHECK-UAR: call i64 @__asan_stack_malloc_1 +; CHECK-UAR: call i64 @__asan_stack_malloc_4 ; CHECK-UAR: label +; CHECK-UAR: store i64 -1007680412564983311 +; CHECK-UAR: store i64 72057598113936114 +; CHECK-UAR: store i64 4076008178 +; CHECK-UAR: store i64 -868082074072645632 +; CHECK-UAR: store i32 -202116109 +; CHECK-UAR: call void @Foo +; CHECK-UAR: call void @Foo ; CHECK-UAR: call void @Foo ; If LocalStackBase != OrigStackBase ; CHECK-UAR: label ; Then Block: poison the entire frame. ; CHECK-UAR: store i64 -723401728380766731 ; CHECK-UAR: store i64 -723401728380766731 + ; CHECK-UAR: store i64 -723401728380766731 + ; CHECK-UAR: store i64 -723401728380766731 + ; CHECK-UAR: store i64 -723401728380766731 + ; CHECK-UAR: store i64 -723401728380766731 + ; CHECK-UAR: store i64 -723401728380766731 + ; CHECK-UAR: store i64 -723401728380766731 + ; CHECK-UAR: store i64 -723401728380766731 + ; CHECK-UAR: store i64 -723401728380766731 + ; CHECK-UAR: store i64 -723401728380766731 + ; CHECK-UAR: store i64 -723401728380766731 + ; CHECK-UAR: store i64 -723401728380766731 + ; CHECK-UAR: store i64 -723401728380766731 + ; CHECK-UAR: store i64 -723401728380766731 + ; CHECK-UAR: store i64 -723401728380766731 ; CHECK-UAR: store i8 0 ; CHECK-UAR-NOT: store ; CHECK-UAR: label ; Else Block: no UAR frame. Only unpoison the redzones. ; CHECK-UAR: store i64 0 + ; CHECK-UAR: store i64 0 + ; CHECK-UAR: store i64 0 + ; CHECK-UAR: store i64 0 ; CHECK-UAR: store i32 0 ; CHECK-UAR-NOT: store ; CHECK-UAR: label @@ -35,8 +59,14 @@ entry: ; CHECK-UAR: ret void %x = alloca [20 x i8], align 16 - %arraydecay = getelementptr inbounds [20 x i8], [20 x i8]* %x, i64 0, i64 0 - call void @Foo(i8* %arraydecay) + %y = alloca [25 x i8], align 1 + %z = alloca [500 x i8], align 1 + %xx = getelementptr inbounds [20 x i8], [20 x i8]* %x, i64 0, i64 0 + call void @Foo(i8* %xx) + %yy = getelementptr inbounds [25 x i8], [25 x i8]* %y, i64 0, i64 0 + call void @Foo(i8* %yy) + %zz = getelementptr inbounds [500 x i8], [500 x i8]* %z, i64 0, i64 0 + call void @Foo(i8* %zz) ret void } |