Patchwork [asan] Use -fno-shrink-wrap for null-deref-1.c test

login
register
mail settings
Submitter Jakub Jelinek
Date Dec. 19, 2012, 12:13 p.m.
Message ID <20121219121341.GX2315@tucnak.redhat.com>
Download mbox | patch
Permalink /patch/207328/
State New
Headers show

Comments

Jakub Jelinek - Dec. 19, 2012, 12:13 p.m.
Hi!

Weirdly this test fails just on some boxes and others succeeds
(x86_64-linux, -Os only).  The problem seems to be in the libasan fast
unwinder, if the routine is shrink-wrapped, even when it is compiled with
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer, if the memory
dereference which is supposed to segfault is outside of the region with
valid frame pointer, the backtrace will still be wrong.

Hopefully fixed by adding -fno-shrink-wrap.

2012-12-19  Jakub Jelinek  <jakub@redhat.com>

	* c-c++-common/asan/null-deref-1.c: Add -fno-shrink-wrap to
	dg-options.


	Jakub
Dodji Seketeli - Jan. 8, 2013, 7:52 a.m.
Jakub Jelinek <jakub@redhat.com> writes:

> 2012-12-19  Jakub Jelinek  <jakub@redhat.com>
>
> 	* c-c++-common/asan/null-deref-1.c: Add -fno-shrink-wrap to
> 	dg-options.

This looks OK to me, thanks.

Patch

--- gcc/testsuite/c-c++-common/asan/null-deref-1.c.jj	2012-12-13 00:02:50.000000000 +0100
+++ gcc/testsuite/c-c++-common/asan/null-deref-1.c	2012-12-19 12:30:05.354962160 +0100
@@ -1,5 +1,5 @@ 
 /* { dg-do run } */
-/* { dg-options "-fno-omit-frame-pointer" } */
+/* { dg-options "-fno-omit-frame-pointer -fno-shrink-wrap" } */
 /* { dg-additional-options "-mno-omit-leaf-frame-pointer" { target { i?86-*-* x86_64-*-* } } } */
 /* { dg-shouldfail "asan" } */