https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70909
--- Comment #41 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- (In reply to Mark Wielaard from comment #40) > Created attachment 40316 [details] > infinite d_print_comp printing protection > > (In reply to Markus Trippelsdorf from comment #39) > > Mark, could you please post your path to gcc-patches? > > Then there might be a chance to get it into binutils before 2.28 gets > > released. > > I did rewrite the patch a little to remove the const arguments, add just the > testcases it fixes and allow up to 2 levels of recursion. That is attached. > > But I still haven't figured out why we need to allow 2 levels of recursion > for some of the cases. See the XXX in the patch. I don't feel I can propose > this unless we figure out why the level needs to be 2 (and not 3 or...) > > If we figure that out we should add the explanation to the comment. Then we > can propose it on gcc-patches. Well, then just use one level of recursion in the patch. And increase the level in a possible follow-up patch later on. This will fix most stack overflows. If we fail to demangle some weird symbols at first, so be it.