This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] 65479 - sanitizer stack trace missing frames past #0 on powerpc64
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Yury Gribov <y dot gribov at samsung dot com>
- Cc: Jeff Law <law at redhat dot com>, Martin Sebor <msebor at redhat dot com>, Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 20 Apr 2015 20:43:44 +0200
- Subject: Re: [PATCH] 65479 - sanitizer stack trace missing frames past #0 on powerpc64
- Authentication-results: sourceware.org; auth=none
- References: <55345AD3 dot 3000403 at redhat dot com> <5535441A dot 4030200 at redhat dot com> <5535478B dot 1080905 at samsung dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Apr 20, 2015 at 09:38:03PM +0300, Yury Gribov wrote:
> >>--- a/gcc/testsuite/ChangeLog
> >>+++ b/gcc/testsuite/ChangeLog
> >>@@ -1,3 +1,12 @@
> >>+2015-04-19 Martin Sebor<msebor@redhat.com>
> >>+
> >>+ PR sanitizer/65479
> >>+ * gcc/testsuite/c-c++-common/asan/misalign-1.c [powerpc*-*-*-*]:
> >>+ Use -fno-omit-frame-pointer. Adjust line numbers and expect exact
> >>+ matches.
> >>+ * gcc/testsuite/c-c++-common/asan/misalign-2.c: Ditto.
> >>+ * gcc/testsuite/c-c++-common/asan/null-deref-1.c: Ditto.
> >So the ChangeLog doesn't match the patch. The changelog references
> >"-fno-omit-frame-pointer", but in the patch you actually add
> >"-fasynchronous-unwind-tables".
> >
> >I also wonder if other targets need -fasynchronous-unwind-tables and
> >whether or not we should just add it unconditionally.
PowerPC really should use the "fast" unwinding unconditionally, as it always
works there reliably due to the ABI requirements.
So IMHO we shouldn't change the tests this way.
> Perhaps enable unwind tables in GCC spec if -fsanitize=address is present?
No. That is orthogonal to that, most targets enable them by default anyway
and if somebody for some reason asks for something different, we should
honor that.
> Sanitizer backtraces typically won't work without unwind tables anyway so
> IMHO this makes sense.
>
> BTW why do we need asynchronous tables? Wouldn't simple -funwind-tables be
> enough?
-funwind-tables enables them only for functions that can throw, while you
really want it for all functions.
Jakub