LEFT | RIGHT |
1 ; Valid two-dimensional array iteration with manual indexing plus an invalid man
ually indexed load. | 1 ; Valid two-dimensional array iteration with manual indexing plus an invalid man
ually indexed 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 ; C-example: #include <stdlib.h> | 62 ; C-example: #include <stdlib.h> |
63 ; C-example: | 63 ; C-example: |
64 ; C-example: int example(void) { | 64 ; C-example: int example(void) { |
65 ; C-example: volatile int array[20][50]; | 65 ; C-example: volatile int array[20][50]; |
66 ; C-example: volatile int *ptr = array[0]; | 66 ; C-example: volatile int *ptr = array[0]; |
67 ; C-example: for(int i = 0; i < 19; ++i) | 67 ; C-example: for(int i = 0; i < 19; ++i) |
68 ; C-example: for(int j = 0; j < 100; ++j) | 68 ; C-example: for(int j = 0; j < 100; ++j) |
69 ; C-example: ptr[i * 50 + j] = i + j; | 69 ; C-example: ptr[i * 50 + j] = i + j; |
70 ; C-example: return ptr[1000]; // BUG | 70 ; C-example: return ptr[1000]; // BUG |
71 ; C-example: } | 71 ; C-example: } |
LEFT | RIGHT |