Re: RFA/RFC: Add stack recursion limit to libiberty's demangler [v3]

2018-12-03 Thread Ian Lance Taylor via gcc-patches
On Mon, Dec 3, 2018 at 6:45 AM, Nick Clifton wrote: > Hi Richard, > >>> * The description of the DMGL_RECURSE_LIMIT option in demangle.h has >>> been enhanced to add a note that if the option is not used, then >>> bug reports about stack overflows in the demangler will be rejected. >> >>

Re: RFA/RFC: Add stack recursion limit to libiberty's demangler [v3]

2018-12-03 Thread Nick Clifton
Hi Richard, >> * The description of the DMGL_RECURSE_LIMIT option in demangle.h has >> been enhanced to add a note that if the option is not used, then >> bug reports about stack overflows in the demangler will be rejected. > > Shouldn't we make it fool-proof by instead introducing a >

Re: RFA/RFC: Add stack recursion limit to libiberty's demangler [v3]

2018-12-03 Thread Richard Biener
On Fri, Nov 30, 2018 at 6:41 PM Nick Clifton wrote: > > Hi Guys, > > >> I think it would be fine to have a large fixed limit plus a flag to > >> disable the limit. > > Great - in which case please may I present version 3 of the patch. In > this version: > > * The cplus_demangle_set_recursion_li

Re: RFA/RFC: Add stack recursion limit to libiberty's demangler [v3]

2018-11-30 Thread Pedro Alves
On 11/30/2018 05:41 PM, Nick Clifton wrote: > @@ -4693,10 +4694,21 @@ > demangle_nested_args (struct work_stuff *work, const char **mangled, >string *declp) > { > + static unsigned long recursion_level = 0; >string* saved_previous_argument; >int result; >int s

Re: RFA/RFC: Add stack recursion limit to libiberty's demangler [v3]

2018-11-30 Thread Jakub Jelinek
Hi! Just spelling nitpicking. On Fri, Nov 30, 2018 at 05:41:35PM +, Nick Clifton wrote: > + order to dmangle truely complicated names, but it also leaves the tools truly? Multiple times. > +The @option{-r} option is a snyonym for the synonym? Multiple times. Jakub

Re: RFA/RFC: Add stack recursion limit to libiberty's demangler [v3]

2018-11-30 Thread Nick Clifton
Hi Guys, >> I think it would be fine to have a large fixed limit plus a flag to >> disable the limit. Great - in which case please may I present version 3 of the patch. In this version: * The cplus_demangle_set_recursion_limit() function has been removed and instead a new constant - DEMA