[PATCH] Fix broken recursion detection when printing static members

Simon Marchi simon.marchi@polymtl.ca
Wed Oct 25 02:23:00 GMT 2017


On 2017-10-24 06:55, Patrick Frants wrote:
> The fix shrinks the stack using obstack_blank_fast() with a negative
> value as described at the bottom of this page:
> https://gcc.gnu.org/onlinedocs/libiberty/Extra-Fast-Growing.html
> "You can use obstack_blank_fast with a “negative” size argument to
> make the current object smaller. Just don’t try to shrink it beyond
> zero length—there’s no telling what will happen if you do that.
> Earlier versions of obstacks allowed you to use obstack_blank to
> shrink objects. This will no longer work."
> 
> A unit test (gdb.cp/printstaticrecursion.exp) was added. No new
> regression has been observed in testsuite/gdb.cp/*.exp.

As mentioned in my last review, did you have a chance to see look if it 
was possible to improve the existing test about recursive static fields 
in gdb.cp/classes.exp, rather than introducing a new one?

Thanks,

Simon



More information about the Gdb-patches mailing list