[llvm-commits] [compiler-rt] r149068 - in /compiler-rt/trunk/lib/asan/tests: heap-overflow.tmpl.Darwin null_deref.tmpl.Darwin strncpy-overflow.tmpl.Darwin use-after-free.tmpl.Darwin
Alexander Potapenko
glider at google.com
Thu Jan 26 09:40:19 PST 2012
Author: glider
Date: Thu Jan 26 11:40:18 2012
New Revision: 149068
URL: http://llvm.org/viewvc/llvm-project?rev=149068&view=rev
Log:
Darwin-specific templates for the output tests.
These should fix the output tests on Mac.
Added:
compiler-rt/trunk/lib/asan/tests/null_deref.tmpl.Darwin
compiler-rt/trunk/lib/asan/tests/strncpy-overflow.tmpl.Darwin
compiler-rt/trunk/lib/asan/tests/use-after-free.tmpl.Darwin
Modified:
compiler-rt/trunk/lib/asan/tests/heap-overflow.tmpl.Darwin
Modified: compiler-rt/trunk/lib/asan/tests/heap-overflow.tmpl.Darwin
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/heap-overflow.tmpl.Darwin?rev=149068&r1=149067&r2=149068&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/heap-overflow.tmpl.Darwin (original)
+++ compiler-rt/trunk/lib/asan/tests/heap-overflow.tmpl.Darwin Thu Jan 26 11:40:18 2012
@@ -5,4 +5,4 @@
#0 0x.* in .*mz_malloc.* _asan_rtl_
#1 0x.* in malloc_zone_malloc.*
#2 0x.* in malloc.*
- #3 0x.* in main heap-overflow.cc:4
+ #3 0x.* in main heap-overflow.cc:[45]
Added: compiler-rt/trunk/lib/asan/tests/null_deref.tmpl.Darwin
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/null_deref.tmpl.Darwin?rev=149068&view=auto
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/null_deref.tmpl.Darwin (added)
+++ compiler-rt/trunk/lib/asan/tests/null_deref.tmpl.Darwin Thu Jan 26 11:40:18 2012
@@ -0,0 +1,5 @@
+.*ERROR: AddressSanitizer crashed on unknown address 0x0*00028 .*pc 0x.*
+AddressSanitizer can not provide additional info. ABORTING
+# atos cannot resolve the file:line info for frame 0 on the O1 level
+ #0 0x.* in NullDeref.*
+ #1 0x.* in main.*null_deref.cc:[67]
Added: compiler-rt/trunk/lib/asan/tests/strncpy-overflow.tmpl.Darwin
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/strncpy-overflow.tmpl.Darwin?rev=149068&view=auto
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/strncpy-overflow.tmpl.Darwin (added)
+++ compiler-rt/trunk/lib/asan/tests/strncpy-overflow.tmpl.Darwin Thu Jan 26 11:40:18 2012
@@ -0,0 +1,9 @@
+WRITE of size 1 at 0x.* thread T0
+ #0 0x.* in wrap_strncpy
+ #1 0x.* in main .*strncpy-overflow.cc:[78]
+0x.* is located 0 bytes to the right of 9-byte region
+allocated by thread T0 here:
+ #0 0x.* in .*mz_malloc.* _asan_rtl_
+ #1 0x.* in malloc_zone_malloc.*
+ #2 0x.* in malloc.*
+ #3 0x.* in main .*strncpy-overflow.cc:6
Added: compiler-rt/trunk/lib/asan/tests/use-after-free.tmpl.Darwin
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/use-after-free.tmpl.Darwin?rev=149068&view=auto
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/use-after-free.tmpl.Darwin (added)
+++ compiler-rt/trunk/lib/asan/tests/use-after-free.tmpl.Darwin Thu Jan 26 11:40:18 2012
@@ -0,0 +1,14 @@
+.*ERROR: AddressSanitizer heap-use-after-free on address 0x.* at pc 0x.* bp 0x.* sp 0x.*
+READ of size 1 at 0x.* thread T0
+ #0 0x.* in main .*use-after-free.cc:5
+0x.* is located 5 bytes inside of 10-byte region .0x.*,0x.*
+freed by thread T0 here:
+ #0 0x.* in .*mz_free.* _asan_rtl_
+# We override free() on Darwin, thus no malloc_zone_free
+ #1 0x.* in free
+ #2 0x.* in main .*use-after-free.cc:[45]
+previously allocated by thread T0 here:
+ #0 0x.* in .*mz_malloc.* _asan_rtl_
+ #1 0x.* in malloc_zone_malloc.*
+ #2 0x.* in malloc.*
+ #3 0x.* in main .*use-after-free.cc:3
More information about the llvm-commits
mailing list