On 04/20/2015 09:43 PM, Jakub Jelinek wrote:
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<mse...@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.
Agreed, I think Martin just wanted a temp workaround until he gets to
fix PowerPC unwinder in LLVM.
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.
Right but asynchronous tables also enable them for all instructions
which is quite an overkill.
-Y