diff options
author | Bill Seurer <seurer@linux.vnet.ibm.com> | 2016-12-21 19:09:10 +0000 |
---|---|---|
committer | Bill Seurer <seurer@gcc.gnu.org> | 2016-12-21 19:09:10 +0000 |
commit | 3a8f9451d9bd8d00ca0bb0d9ca45c54f794600e5 (patch) | |
tree | 40a9bde9dedb1489f4ec3daa33e17f919abeb73f /gcc | |
parent | 8f0db5664a193a11e1141f003edbff48c29274ca (diff) | |
download | gcc-3a8f9451d9bd8d00ca0bb0d9ca45c54f794600e5.zip gcc-3a8f9451d9bd8d00ca0bb0d9ca45c54f794600e5.tar.gz gcc-3a8f9451d9bd8d00ca0bb0d9ca45c54f794600e5.tar.bz2 |
[PATCH, v2, rs6000] pr65479 Add -fasynchronous-unwind-tables when the -fsanitize=address option is seen.
All feedback from the earlier version has been taken into account now.
This patch adds the -fasynchronous-unwind-tables option to compilations when
the -fsanitize=address option is seen but not if any
-fasynchronous-unwind-tables options were already specified.
-fasynchronous-unwind-tables causes a full strack trace to be produced when
the sanitizer detects an error. Without the full trace several of the asan
test cases fail on powerpc.
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65479 for more information.
Bootstrapped and tested on powerpc64le-unknown-linux-gnu,
powerpc64be-unknown-linux-gnu, and x86_64-pc-linux-gnu with no regressions.
Is this ok for trunk?
[gcc]
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: r243863
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9065731..0a7f34a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +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. + 2016-12-21 Bernd Schmidt <bschmidt@redhat.com> PR target/71321 diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 93088a3..a870d60 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -3858,6 +3858,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) { |