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

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

Issue 2211733002: Subzero: Improved quality of ASan error messages (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Replaced switch statements with table lookups 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
« no previous file with comments | « tests_lit/asan_tests/multiple_returns.ll ('k') | tests_lit/asan_tests/wideloads.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 ; Test that shrinking an allocation updates the redzones 1 ; Test that shrinking an allocation updates the redzones
2 2
3 ; REQUIRES: no_minimal_build 3 ; REQUIRES: no_minimal_build
4 4
5 ; RUN: llvm-as %s -o - | pnacl-freeze > %t.pexe && %S/../../pydir/szbuild.py \ 5 ; RUN: llvm-as %s -o - | pnacl-freeze > %t.pexe && %S/../../pydir/szbuild.py \
6 ; RUN: --fsanitize-address --sz=-allow-externally-defined-symbols \ 6 ; RUN: --fsanitize-address --sz=-allow-externally-defined-symbols \
7 ; RUN: %t.pexe -o %t && %t 2>&1 | FileCheck %s 7 ; RUN: %t.pexe -o %t && %t 2>&1 | FileCheck %s
8 8
9 9
10 declare external i32 @malloc(i32) 10 declare external i32 @malloc(i32)
11 declare external i32 @realloc(i32, i32) 11 declare external i32 @realloc(i32, i32)
12 declare external void @free(i32) 12 declare external void @free(i32)
13 13
14 define void @_start(i32 %arg) { 14 define void @_start(i32 %arg) {
15 %ptr16 = call i32 @malloc(i32 16) 15 %ptr16 = call i32 @malloc(i32 16)
16 %off12a = add i32 %ptr16, 12 16 %off12a = add i32 %ptr16, 12
17 %offptra = inttoptr i32 %off12a to i32* 17 %offptra = inttoptr i32 %off12a to i32*
18 %resa = load i32, i32* %offptra, align 1 18 %resa = load i32, i32* %offptra, align 1
19 %ptr8 = call i32 @realloc(i32 %ptr16, i32 8) 19 %ptr8 = call i32 @realloc(i32 %ptr16, i32 8)
20 %off12b = add i32 %ptr8, 12 20 %off12b = add i32 %ptr8, 12
21 %offptrb = inttoptr i32 %off12b to i8* 21 %offptrb = inttoptr i32 %off12b to i8*
22 %resb = load i8, i8* %offptrb, align 1 22 %resb = load i8, i8* %offptrb, align 1
23 ret void 23 ret void
24 } 24 }
25 25
26 ; CHECK: Illegal access of 1 bytes at 26 ; CHECK: Illegal 1 byte load from heap object at
OLDNEW
« no previous file with comments | « tests_lit/asan_tests/multiple_returns.ll ('k') | tests_lit/asan_tests/wideloads.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698