Earlier, I wrote: > Strangely, the stack overflow doesn't happen when I run the compile > command (as echoed by make) directly from the command line. I only > see it happen when compiling via make.
I just noticed something. Look at the result of (debug-options) in the first backtrace I sent: > (show-file-name #t stack 40000 debug backtrace depth 100 maxdepth 1000 frames > 3 indent 10 width 79 procnames cheap) Notice the "stack 40000", which means that the stack limit (as far as guile is concerned) is only 40000 words, i.e. 160 kilobytes. Other times, I see much larger numbers there, which are close to the actual stack resource limit (as set by setrlimit), and in those cases the stack doesn't overflow. I'm not able to reliably reproduce these problems, but it seems that the problem is not in the compiler, but in the code that initializes guile's internal notion of its stack limit. Indeed, I'm able to compile the ecmascript code with a 512 kilobyte stack, as long as guile doesn't get confused about its stack limit. Mark