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

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

Issue 2054943002: Implemented global redzones. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Finished reformatting Created 4 years, 6 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
« no previous file with comments | « src/IceInstrumentation.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 ; Test of global redzone layout
2
3 ; REQUIRES: allow_dump
4
5 ; RUN: %p2i -i %s --args -threads=0 -fsanitize-address \
6 ; RUN: | %iflc FileCheck %s
7 ; RUN: %p2i -i %s --args -verbose=global_init,inst -threads=0 \
8 ; RUN: -fsanitize-address | %iflc FileCheck --check-prefix=DUMP %s
9
10 ; The array of redzones
11
12 ; DUMP-LABEL: ========= Instrumented Globals =========
13 ; DUMP: @__$rz0 = internal constant <{ i32, i32, i32, i32, i32, i32 }>
14 ; DUMP: <{ i32 ptrtoint ([32 x i8]* @__$rz2 to i32), i32 ptrtoint ([32 x i8]* @__$rz3 to i32),
15 ; DUMP: i32 ptrtoint ([32 x i8]* @__$rz4 to i32), i32 ptrtoint ([32 x i8 ]* @__$rz5 to i32),
16 ; DUMP: i32 ptrtoint ([32 x i8]* @__$rz6 to i32), i32 ptrtoint ([32 x i8 ]* @__$rz7 to i32) }>
17 ; DUMP-NEXT: @__$rz1 = internal constant [4 x i8] c"\06\00\00\00"
18
19 ; CHECK-LABEL: .type __$rz0,%object
20 ; CHECK-NEXT: .section .rodata
21 ; CHECK-NEXT: __$rz0:
22 ; CHECK-NEXT: .long __$rz2
23 ; CHECK-NEXT: .long __$rz3
24 ; CHECK-NEXT: .long __$rz4
25 ; CHECK-NEXT: .long __$rz5
26 ; CHECK-NEXT: .long __$rz6
27 ; CHECK-NEXT: .long __$rz7
28 ; CHECK-LABEL: .type __$rz1,%object
29 ; CHECK-NEXT: .section .rodata
30 ; CHECK-NEXT: __$rz1:
31 ; CHECK-NEXT: .byte 6
32 ; CHECK-NEXT: .byte 0
33 ; CHECK-NEXT: .byte 0
34 ; CHECK-NEXT: .byte 0
35
36 ; A zero-initialized global
37 @zeroInitGlobal = internal global [32 x i8] zeroinitializer
38
39 ; DUMP-NEXT: @__$rz2 = internal global [32 x i8] zeroinitializer
40 ; DUMP-NEXT: @zeroInitGlobal = internal global [32 x i8] zeroinitializer
41 ; DUMP-NEXT: @__$rz3 = internal global [32 x i8] zeroinitializer
42
43 ; CHECK-LABEL: .type __$rz2,%object
44 ; CHECK-NEXT: .section .bss
45 ; CHECK-NEXT: __$rz2:
46 ; CHECK-LABEL: .type zeroInitGlobal,%object
47 ; CHECK-NEXT: .section .bss
48 ; CHECK-NEXT: zeroInitGlobal:
49 ; CHECK-LABEL: .type __$rz3,%object
50 ; CHECK-NEXT: .section .bss
51 ; CHECK-NEXT: __$rz3:
52
53 ; A constant-initialized global
54 @constInitGlobal = internal constant [32 x i8] c"ABCDEFGHIJKLMNOPQRSTUVWXYZ01234 5"
55
56 ; CHECK-LABEL: .type __$rz4,%object
57 ; CHECK-NEXT: .section .rodata
58 ; CHECK-NEXT: __$rz4:
59 ; CHECK-LABEL: .type constInitGlobal,%object
60 ; CHECK-NEXT: .section .rodata
61 ; CHECK-NEXT: constInitGlobal:
62 ; CHECK-LABEL: .type __$rz5,%object
63 ; CHECK-NEXT: .section .rodata
64 ; CHECK-NEXT: __$rz5:
65
66 ; DUMP-NEXT: @__$rz4 = internal constant [32 x i8] c"RRRRRRRRRRRRRRRRRRRRRRRRRRR RRRRR"
67 ; DUMP-NEXT: @constInitGlobal = internal constant [32 x i8] c"ABCDEFGHIJKLMNOPQR STUVWXYZ012345"
68 ; DUMP-NEXT: @__$rz5 = internal constant [32 x i8] c"RRRRRRRRRRRRRRRRRRRRRRRRRRR RRRRR"
69
70 ; A regular global
71 @regInitGlobal = internal global [32 x i8] c"ABCDEFGHIJKLMNOPQRSTUVWXYZ012345"
72
73 ; DUMP-NEXT: @__$rz6 = internal global [32 x i8] c"RRRRRRRRRRRRRRRRRRRRRRRRRRRRR RRR"
74 ; DUMP-NEXT: @regInitGlobal = internal global [32 x i8] c"ABCDEFGHIJKLMNOPQRSTUV WXYZ012345"
75 ; DUMP-NEXT: @__$rz7 = internal global [32 x i8] c"RRRRRRRRRRRRRRRRRRRRRRRRRRRRR RRR"
76
77 ; CHECK-LABEL: .type __$rz6,%object
78 ; CHECK-NEXT: .section .data
79 ; CHECK-NEXT: __$rz6:
80 ; CHECK-LABEL: .type regInitGlobal,%object
81 ; CHECK-NEXT: .section .data
82 ; CHECK-NEXT: regInitGlobal:
83 ; CHECK-LABEL: .type __$rz7,%object
84 ; CHECK-NEXT: .section .data
85 ; CHECK-NEXT: __$rz7:
86
87 define internal void @func() {
88 ret void
89 }
90
91 ; DUMP-LABEL: define internal void @func() {
92 ; CHECK-LABEL: func:
OLDNEW
« no previous file with comments | « src/IceInstrumentation.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698