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

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

Issue 2256673004: Subzero: Added address of bad instruction to error output (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Clarified error message 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 | « runtime/szrt_asan.c ('k') | tests_lit/asan_tests/errors.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 double frees are detected 1 ; Test that double frees are detected
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 --check-prefix=ERR %s 7 ; RUN: %t.pexe -o %t && %t 2>&1 | FileCheck --check-prefix=ERR %s
8 ; RUN: llvm-as %s -o - | pnacl-freeze > %t.pexe && %S/../../pydir/szbuild.py \ 8 ; RUN: llvm-as %s -o - | pnacl-freeze > %t.pexe && %S/../../pydir/szbuild.py \
9 ; RUN: --fsanitize-address --sz=-allow-externally-defined-symbols -O2 \ 9 ; RUN: --fsanitize-address --sz=-allow-externally-defined-symbols -O2 \
10 ; RUN: %t.pexe -o %t && %t 2>&1 | FileCheck --check-prefix=ERR %s 10 ; RUN: %t.pexe -o %t && %t 2>&1 | FileCheck --check-prefix=ERR %s
11 11
12 declare external i32 @malloc(i32) 12 declare external i32 @malloc(i32)
13 declare external void @free(i32) 13 declare external void @free(i32)
14 declare external void @exit(i32) 14 declare external void @exit(i32)
15 15
16 define void @_start(i32 %arg) { 16 define void @_start(i32 %arg) {
17 %alloc = call i32 @malloc(i32 42) 17 %alloc = call i32 @malloc(i32 42)
18 call void @free(i32 %alloc) 18 call void @free(i32 %alloc)
19 call void @free(i32 %alloc) 19 call void @free(i32 %alloc)
20 call void @exit(i32 1) 20 call void @exit(i32 1)
21 ret void 21 ret void
22 } 22 }
23 23
24 ; ERR: Double free of object at 24 ; ERR: Double free of object at
25 ; ERR-NEXT: address of __asan_error symbol is
OLDNEW
« no previous file with comments | « runtime/szrt_asan.c ('k') | tests_lit/asan_tests/errors.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698