LEFT | RIGHT |
1 ; Valid two-dimensional array iteration plus a valid load. | 1 ; Valid two-dimensional array iteration plus a valid load. |
2 | 2 |
3 ; RUN: opt < %s -asan -S -asan-opt=1 | FileCheck %s -check-prefix=OPT1 | 3 ; RUN: opt < %s -asan -S -asan-opt=1 -asan-opt-known-bounds=1 | FileCheck %s -ch
eck-prefix=OPT1 |
4 ; RUN: opt < %s -asan -S -asan-opt=0 | FileCheck %s -check-prefix=OPT0 | 4 ; RUN: opt < %s -asan -S -asan-opt=0 | FileCheck %s -check-prefix=OPT0 |
5 | 5 |
6 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
2:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:6
4-S128" | 6 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
2:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:6
4-S128" |
7 target triple = "x86_64-unknown-linux-gnu" | 7 target triple = "x86_64-unknown-linux-gnu" |
8 | 8 |
9 define i32 @example() address_safety nounwind uwtable { | 9 define i32 @example() address_safety nounwind uwtable { |
10 entry: | 10 entry: |
11 %array = alloca [20 x [50 x i32]], align 16 | 11 %array = alloca [20 x [50 x i32]], align 16 |
12 br label %for.cond1.preheader | 12 br label %for.cond1.preheader |
13 | 13 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 50 |
51 ; C-example: #include <stdlib.h> | 51 ; C-example: #include <stdlib.h> |
52 ; C-example: | 52 ; C-example: |
53 ; C-example: int example(void) { | 53 ; C-example: int example(void) { |
54 ; C-example: volatile int array[20][50]; | 54 ; C-example: volatile int array[20][50]; |
55 ; C-example: for(int i = 0; i < 19; ++i) | 55 ; C-example: for(int i = 0; i < 19; ++i) |
56 ; C-example: for(int j = 0; j < 100; ++j) | 56 ; C-example: for(int j = 0; j < 100; ++j) |
57 ; C-example: array[i][j] = i + j; | 57 ; C-example: array[i][j] = i + j; |
58 ; C-example: return array[18][99]; | 58 ; C-example: return array[18][99]; |
59 ; C-example: } | 59 ; C-example: } |
LEFT | RIGHT |