]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR sanitizer/65479 (sanitizer stack trace missing frames past #0 on...
authorBill Seurer <seurer@linux.vnet.ibm.com>
Tue, 10 Jan 2017 19:11:55 +0000 (19:11 +0000)
committerBill Seurer <seurer@gcc.gnu.org>
Tue, 10 Jan 2017 19:11:55 +0000 (19:11 +0000)
2017-01-10  Bill Seurer  <seurer@linux.vnet.ibm.com>

Backport from mainline
2016-12-21  Bill Seurer  <seurer@linux.vnet.ibm.com>

PR sanitizer/65479
* config/rs6000/rs6000.c (rs6000_option_override_internal): Add
-fasynchronous-unwind-tables option when -fsanitize=address is
specified.

From-SVN: r244284

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index ce2f7286e304e0d9fbd7209474fcbb5a03e84866..099cbe97bc200ffc8654678417e2798a1126f458 100644 (file)
@@ -1,3 +1,13 @@
+2017-01-10  Bill Seurer  <seurer@linux.vnet.ibm.com>
+
+       Backport from mainline
+       2016-12-21  Bill Seurer  <seurer@linux.vnet.ibm.com>
+
+       PR sanitizer/65479
+       * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
+       -fasynchronous-unwind-tables option when -fsanitize=address is
+       specified.
+
 2017-01-10  Martin Liska  <mliska@suse.cz>
 
        Backport from mainline
index c66bfb0b5e5e99734764f5c71fd2eaa8987443cf..5bba64e9c07d6031d0a4d33f4baa30ec66a4e52c 100644 (file)
@@ -3268,6 +3268,13 @@ rs6000_option_override_internal (bool global_init_p)
       && !global_options_set.x_flag_ira_loop_pressure)
     flag_ira_loop_pressure = 1;
 
+  /* -fsanitize=address needs to turn on -fasynchronous-unwind-tables in order
+     for tracebacks to be complete but not if any -fasynchronous-unwind-tables
+     options were already specified.  */
+  if (flag_sanitize & SANITIZE_USER_ADDRESS
+      && !global_options_set.x_flag_asynchronous_unwind_tables)
+    flag_asynchronous_unwind_tables = 1;
+
   /* Set the pointer size.  */
   if (TARGET_64BIT)
     {