[llvm] r279109 - [asan] Extend test

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 18 11:17:20 PDT 2016


Author: vitalybuka
Date: Thu Aug 18 13:17:19 2016
New Revision: 279109

URL: http://llvm.org/viewvc/llvm-project?rev=279109&view=rev
Log:
[asan] Extend test

Summary: PR27453

Reviewers: eugenis

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D23647

Modified:
    llvm/trunk/test/Instrumentation/AddressSanitizer/stack-poisoning.ll

Modified: llvm/trunk/test/Instrumentation/AddressSanitizer/stack-poisoning.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Instrumentation/AddressSanitizer/stack-poisoning.ll?rev=279109&r1=279108&r2=279109&view=diff
==============================================================================
--- llvm/trunk/test/Instrumentation/AddressSanitizer/stack-poisoning.ll (original)
+++ llvm/trunk/test/Instrumentation/AddressSanitizer/stack-poisoning.ll Thu Aug 18 13:17:19 2016
@@ -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
 }
 




More information about the llvm-commits mailing list