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

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

Issue 2148413003: Subzero: Instrumented realloc (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Added realloc test, fixed realloc redzones Created 4 years, 5 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/instrumentmalloc.ll ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 ; Test that shrinking an allocation updates the redzones
2
3 ; REQUIRES: no_minimal_build
4
5 ; RUN: llvm-as %s -o - | pnacl-freeze > %t.pexe && %S/../../pydir/szbuild.py \
6 ; RUN: --fsanitize-address --sz="-allow-externally-defined-symbols" \
Jim Stichnoth 2016/07/21 01:42:09 You don't really need the double-quotes here.
7 ; RUN: %t.pexe -o %t && %t 2>&1 | FileCheck %s
8
9
10 declare external i32 @malloc(i32)
11 declare external i32 @realloc(i32, i32)
12 declare external void @free(i32)
13
14 define void @_start(i32 %arg) {
15 %ptr16 = call i32 @malloc(i32 16)
16 %off12a = add i32 %ptr16, 12
17 %offptra = inttoptr i32 %off12a to i32*
18 %resa = load i32, i32* %offptra, align 1
19 %ptr8 = call i32 @realloc(i32 %ptr16, i32 8)
20 %off12b = add i32 %ptr8, 12
21 %offptrb = inttoptr i32 %off12b to i8*
22 %resb = load i8, i8* %offptrb, align 1
23 ret void
24 }
25
26 ; CHECK: Illegal access of 1 bytes at
Jim Stichnoth 2016/07/21 01:42:09 "1 bytes" :) (never mind...)
OLDNEW
« no previous file with comments | « tests_lit/asan_tests/instrumentmalloc.ll ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698