Jonas Hahnfeld via Discussions on LilyPond development <[email protected]> writes:
> Am Montag, den 08.06.2020, 10:24 +0200 schrieb Dave Plater: >> Hi, I maintain Lilypond for openSUSE and also created guile1 for >> lilypond using guile-1.8.8 >> I have a problem, guile-1.8.8 doesn't build with gcc 10: >> [...] >> >> Causes a: >> 15388 Segmentation fault | >> GUILE="/home/abuild/rpmbuild/BUILD/guile-1.8.8/pre-inst-guile" >> ../scripts/snarf-check-and-output-texi > guile-procedures.texi >> >> This is beyond my capabilities, the above command resists gdb --args >> so I'm unable to see where the segfault happens. Something in gcc10 is >> exposing a problem in guile-1.8.8 > > Yep, GCC 10 "breaks" the configure check to find the stack direction. > This makes Guile believe the stack grows up, which is of course plain > wrong. I was able to workaround this issue by disabling optimizations > for the configure check, see attached diff. > > (For the technically interested: GCC 10 succeeds in rewriting a > particular tail call into jumps. This avoids stack frames from the > recursive call which the check relies on. Funnily enough, a comment > says: "If the code could be inlined, that might cause the test to give > an incorrect answer." - indeed.) It's easy enough to write a recursive call that cannot be tail-call optimised. It may be old code, but it was trouble waiting to happen. -- David Kastrup
