diff --git a/compiler-rt/lib/asan/tests/heap-overflow.tmpl.Darwin b/compiler-rt/lib/asan/tests/heap-overflow.tmpl.Darwin index e4611d067abe..b6ac199ce83b 100644 --- a/compiler-rt/lib/asan/tests/heap-overflow.tmpl.Darwin +++ b/compiler-rt/lib/asan/tests/heap-overflow.tmpl.Darwin @@ -5,4 +5,4 @@ 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 heap-overflow.cc:4 + #3 0x.* in main heap-overflow.cc:[45] diff --git a/compiler-rt/lib/asan/tests/null_deref.tmpl.Darwin b/compiler-rt/lib/asan/tests/null_deref.tmpl.Darwin new file mode 100644 index 000000000000..8c121431ec54 --- /dev/null +++ b/compiler-rt/lib/asan/tests/null_deref.tmpl.Darwin @@ -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] diff --git a/compiler-rt/lib/asan/tests/strncpy-overflow.tmpl.Darwin b/compiler-rt/lib/asan/tests/strncpy-overflow.tmpl.Darwin new file mode 100644 index 000000000000..3039ba0859c6 --- /dev/null +++ b/compiler-rt/lib/asan/tests/strncpy-overflow.tmpl.Darwin @@ -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 diff --git a/compiler-rt/lib/asan/tests/use-after-free.tmpl.Darwin b/compiler-rt/lib/asan/tests/use-after-free.tmpl.Darwin new file mode 100644 index 000000000000..2bc9d6179cc6 --- /dev/null +++ b/compiler-rt/lib/asan/tests/use-after-free.tmpl.Darwin @@ -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