Re: [PATCH] libiberty: Limit demangler maximum d_print_comp recursion call depth.

2017-04-18 Thread Ian Lance Taylor via gcc-patches
On Tue, Apr 18, 2017 at 4:03 PM, Mark Wielaard wrote: > On Tue, Apr 18, 2017 at 03:40:05PM -0700, Ian Lance Taylor wrote: >> On Tue, Apr 18, 2017 at 3:23 PM, Mark Wielaard wrote: >> > The fix for PR demangler/70909 and 67264 (endless demangler recursion) >> > catches when a demangle_component is

Re: [PATCH] libiberty: Limit demangler maximum d_print_comp recursion call depth.

2017-04-18 Thread Mark Wielaard
On Tue, Apr 18, 2017 at 03:40:05PM -0700, Ian Lance Taylor wrote: > On Tue, Apr 18, 2017 at 3:23 PM, Mark Wielaard wrote: > > The fix for PR demangler/70909 and 67264 (endless demangler recursion) > > catches when a demangle_component is printed in a cycle. But that doesn't > > protect the call st

Re: [PATCH] libiberty: Limit demangler maximum d_print_comp recursion call depth.

2017-04-18 Thread Ian Lance Taylor via gcc-patches
On Tue, Apr 18, 2017 at 3:23 PM, Mark Wielaard wrote: > The fix for PR demangler/70909 and 67264 (endless demangler recursion) > catches when a demangle_component is printed in a cycle. But that doesn't > protect the call stack blowing up from non-cyclic nested types printed > recursively through

[PATCH] libiberty: Limit demangler maximum d_print_comp recursion call depth.

2017-04-18 Thread Mark Wielaard
The fix for PR demangler/70909 and 67264 (endless demangler recursion) catches when a demangle_component is printed in a cycle. But that doesn't protect the call stack blowing up from non-cyclic nested types printed recursively through d_print_comp. This can happen by a (very) long mangled string t