This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, rs6000] pr65479 Add -fasynchronous-unwind-tables when the -fsanitize=address option is seen
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Segher Boessenkool <segher at kernel dot crashing dot org>
- Cc: Bill Seurer <seurer at linux dot vnet dot ibm dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 6 Dec 2016 23:03:27 +0100
- Subject: Re: [PATCH, rs6000] pr65479 Add -fasynchronous-unwind-tables when the -fsanitize=address option is seen
- Authentication-results: sourceware.org; auth=none
- References: <39413c1c-a91f-3038-df8f-96ca142f2eb9@linux.vnet.ibm.com> <b8f072f0-96de-1a10-638f-c1a1191aac05@linux.vnet.ibm.com> <20161206215554.GI2767@gate.crashing.org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Dec 06, 2016 at 03:55:54PM -0600, Segher Boessenkool wrote:
> On Tue, Dec 06, 2016 at 03:23:06PM -0600, Bill Seurer wrote:
> > 2016-12-06 Bill Seurer <seurer@linux.vnet.ibm.com>
> >
> > PR sanitizer/65479
> > * gcc/config/rs6000/rs6000.c: Add -fasynchronous-unwind-tables option when
> > -fsanitize=address is specified.
>
> You should mention the function name here.
And not use the gcc/ prefix in the filename.
> > --- gcc/config/rs6000/rs6000.c (revision 243308)
> > +++ gcc/config/rs6000/rs6000.c (working copy)
> > @@ -5204,6 +5204,11 @@ rs6000_option_override (void)
> > {
> > (void) rs6000_option_override_internal (true);
> >
> > + /* -fsanitize=address needs to turn on -fasynchronous-unwind-tables for
> > + ppc64 in order for tracebacks to be complete. */
> > + if (global_options.x_flag_sanitize & SANITIZE_USER_ADDRESS)
> > + global_options.x_flag_asynchronous_unwind_tables = 1;
>
> Do you need to check if the user specified -fno-asynchronous-unwind-tables
> here, and then not do this? I.e. similar to the rs6000_isa_flags_explicit
> handling (in the _internal function).
Why are you changing it here and not in the *_internal function?
Why do you use global_options.x_* instead of just *?
And Segher has a point, it should be likely:
if ((flag_sanitize & SANITIZE_USER_ADDRESS)
&& !global_options_set.x_flag_asynchronous_unwind_tables)
flag_asynchronous_unwind_tables = 1;
Jakub