Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: tests_lit/asan_tests/alignment.ll

Issue 2194853003: Subzero: Implemented codegen for poisoning and unpoisoning stack redzones (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 ; Translate with -fsanitize-address and -O2 to test alignment and ordering of 1 ; Translate with -fsanitize-address and -O2 to test alignment and ordering of
2 ; redzones when allocas are coalesced. 2 ; redzones when allocas are coalesced.
3 3
4 ; REQUIRES: no_minimal_build 4 ; REQUIRES: no_minimal_build
5 5
6 ; RUN: %p2i --filetype=obj --disassemble --target x8632 -i %s --args -O2 \ 6 ; RUN: %p2i --filetype=obj --disassemble --target x8632 -i %s --args -O2 \
7 ; RUN: -allow-externally-defined-symbols -fsanitize-address | FileCheck %s 7 ; RUN: -allow-externally-defined-symbols -fsanitize-address | FileCheck %s
8 8
9 define internal i32 @func(i32 %arg1, i32 %arg2) { 9 define internal i32 @func(i32 %arg1, i32 %arg2) {
10 %l1 = alloca i8, i32 4, align 4 10 %l1 = alloca i8, i32 4, align 4
11 %l2 = alloca i8, i32 5, align 1 11 %l2 = alloca i8, i32 5, align 1
12 ret i32 42 12 ret i32 42
13 } 13 }
14 14
15 ; CHECK: func 15 ; CHECK: func
16 ; CHECK-NEXT: sub esp,0xbc 16 ; CHECK-NEXT: sub esp,0xa0
17 ; CHECK-NEXT: lea eax,[esp+0x10] 17 ; CHECK-NEXT: lea eax,[esp]
18 ; CHECK-NEXT: mov DWORD PTR [esp],eax 18 ; CHECK-NEXT: shr eax,0x3
19 ; CHECK-NEXT: mov DWORD PTR [esp+0x4],0x20 19 ; CHECK-NEXT: mov DWORD PTR [eax+0x20000000],0xffffffff
20 ; CHECK-NEXT: __asan_poison 20 ; CHECK-NEXT: mov DWORD PTR [eax+0x20000004],0xffffff04
21 ; CHECK-NEXT: lea eax,[esp+0x74] 21 ; CHECK-NEXT: mov DWORD PTR [eax+0x20000008],0xffffffff
22 ; CHECK-NEXT: mov DWORD PTR [esp],eax 22 ; CHECK-NEXT: mov DWORD PTR [eax+0x2000000c],0xffffff05
23 ; CHECK-NEXT: mov DWORD PTR [esp+0x4],0x3c 23 ; CHECK-NEXT: mov DWORD PTR [eax+0x20000010],0xffffffff
24 ; CHECK-NEXT: __asan_poison 24 ; CHECK-NEXT: mov DWORD PTR [eax+0x20000000],0x0
25 ; CHECK-NEXT: lea eax,[esp+0x35] 25 ; CHECK-NEXT: mov DWORD PTR [eax+0x20000004],0x0
26 ; CHECK-NEXT: mov DWORD PTR [esp],eax 26 ; CHECK-NEXT: mov DWORD PTR [eax+0x20000008],0x0
27 ; CHECK-NEXT: mov DWORD PTR [esp+0x4],0x3b 27 ; CHECK-NEXT: mov DWORD PTR [eax+0x2000000c],0x0
28 ; CHECK-NEXT: __asan_poison 28 ; CHECK-NEXT: mov DWORD PTR [eax+0x20000010],0x0
29 ; CHECK-NEXT: lea eax,[esp+0x74]
30 ; CHECK-NEXT: mov DWORD PTR [esp],eax
31 ; CHECK-NEXT: mov DWORD PTR [esp+0x4],0x3c
32 ; CHECK-NEXT: __asan_unpoison
33 ; CHECK-NEXT: lea eax,[esp+0x35]
34 ; CHECK-NEXT: mov DWORD PTR [esp],eax
35 ; CHECK-NEXT: mov DWORD PTR [esp+0x4],0x3b
36 ; CHECK-NEXT: __asan_unpoison
37 ; CHECK-NEXT: lea eax,[esp+0x10]
38 ; CHECK-NEXT: mov DWORD PTR [esp],eax
39 ; CHECK-NEXT: mov DWORD PTR [esp+0x4],0x20
40 ; CHECK-NEXT: __asan_unpoison
41 ; CHECK-NEXT: mov eax,0x2a 29 ; CHECK-NEXT: mov eax,0x2a
42 ; CHECK-NEXT: add esp,0xbc 30 ; CHECK-NEXT: add esp,0xa0
43 ; CHECK-NEXT: ret 31 ; CHECK-NEXT: ret
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698