My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 249: limbo compilers use too much stack for eg array data
2 people starred this issue and may be notified of changes. Back to list
Status:  Accepted
Owner:  ----


Sign in to add a comment
 
Reported by mechiel@ueber.net, Feb 28, 2011
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.
limbo-stack.diff
3.1 KB   View   Download
Mar 8, 2011
Project Member #1 Charles....@gmail.com
(No comment was entered for this change.)
Status: Accepted
Labels: Type-Enhancement
Sign in to add a comment

Powered by Google Project Hosting