Chromium Code Reviews| OLD | NEW |
|---|---|
| (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...)
| |
| OLD | NEW |