Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(163)

Delta Between Two Patch Sets: test/Instrumentation/AddressSanitizer/OptKnownBounds/double-loop-invalid-end.ll

Issue 6643048: Add a known bounds optimization to ASan.
Left Patch Set: Created 11 years, 5 months ago
Right Patch Set: Match the DataLayout getIntPtrType change. Created 11 years, 5 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
LEFTRIGHT
1 ; Invalid (off by 1 at the end) two-dimensional array iteration plus a valid loa d. 1 ; Invalid (off by 1 at the end) two-dimensional array iteration plus a valid loa d.
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 ; C-example: #include <stdlib.h> 60 ; C-example: #include <stdlib.h>
61 ; C-example: 61 ; C-example:
62 ; C-example: int example(void) { 62 ; C-example: int example(void) {
63 ; C-example: volatile int array[20][50]; 63 ; C-example: volatile int array[20][50];
64 ; C-example: for(int i = 0; i < 20; ++i) 64 ; C-example: for(int i = 0; i < 20; ++i)
65 ; C-example: for(int j = 0; j <= 50; ++j) 65 ; C-example: for(int j = 0; j <= 50; ++j)
66 ; C-example: array[i][j] = i + j; // BUG (if i == 19 && j == 50) 66 ; C-example: array[i][j] = i + j; // BUG (if i == 19 && j == 50)
67 ; C-example: return array[11][40]; 67 ; C-example: return array[11][40];
68 ; C-example: } 68 ; C-example: }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b