This is the mail archive of the gcc@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: Invalid tree node causes segfault in diagnostic


Paulo Matos <pmatos@broadcom.com> wrote:
>> -----Original Message-----
>> From: Richard Biener [mailto:richard.guenther@gmail.com]
>> Sent: 11 October 2013 13:47
>> To: Paulo Matos
>> Cc: gcc@gcc.gnu.org
>> Subject: Re: Invalid tree node causes segfault in diagnostic
>> 
>> 
>> Hmm.  We have several places accessing tree_code_name without
>checking.
>> May I suggest to abstract accesses to it with a function call which
>can
>> do the proper checking and return "<invalid tree code>" instead?
>> 
>
>Sounds good. I will prepare a patch with the change suggested for
>review.
>While I am at it, can I patch backends as well? For example mep/mep.c
>has an occurrence
>of tree_code_name[TREE_CODE (...

Sure.  Tree_code_name should be static inside tree.c after the patch.

Thanks,
Richard.



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