This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, rs6000] pr65479 Add -fasynchronous-unwind-tables when the -fsanitize=address option is seen


On 12/6/16 3:55 PM, Segher Boessenkool wrote:
> On Tue, Dec 06, 2016 at 03:23:06PM -0600, Bill Seurer wrote:
>> --- 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).

I agree that if the user explicitly says -fno-asynchronous-unwind-tables,
we shouldn't implicitly enable it behind their back.

I also don't see how this is ppc64 specific, but your comment mentions
it.  The way the code is written here, this will be used for ppc32, ppc64
and ppc64le.  I'd just rewrite the comment without mentioning ppc64 or
replace it with a more general term (PowerPC?).

Peter



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]