compiling appl/lib/ida/idatab.b crashes the limbo compilers on most systems,
due to stack growth due to recursion. i have another limbo program that is
compiled with a huge "array of byte", it has the same problem.
the big recursion depth seems to happen in three places (found by running the c
compiler and looking at the backtrace when it crashes; other limbo code might
trigger big recursion in other places). the attached patch fixes both the c &
limbo versions of the compiler. i think, but i'm not completely sure, that the
Oseq nodes can be handled this way (i.e. their lefts & rights folded/rewritten
independently; the third case (in decls.[bc]) makes it tail recursive).
without this, my limbo program crashes the c limbo compiler on openbsd/386 even
with an allowed stack of 24mb (32mb does work). with this, 250kb stack is
enough. idatab.b can be compiled with this too.
Original issue reported on code.google.com by mechiel@ueber.net on 28 Feb 2011 at 7:24
Original issue reported on code.google.com by
mechiel@ueber.net
on 28 Feb 2011 at 7:24Attachments: