On Mon, Mar 16, 2009 at 2:32 PM, Taylor Venable <tay...@metasyntax.net> wrote: > > Usually when it hangs, I end up sending it ^C when it's inside mark(). > So if I step out to C_reclaim() I can step through from line 2802 (or > sometimes 2805; in runtime.c) to line 3016. This I do in GDB using > the "next" command. When I hit line 3016 which is > > C_longjmp(C_restart, 1); > > the program hangs again. If I send it ^C again I'm back in that same > region of code again inside C_reclaim. This happens infinitely, as > far as I can tell.
Right. The GC seems to loop. > > And tracing a bit further, it looks like C_library_toplevel() is > continuously calling C_reclaim(). The code that looks like (library.c > line 6616): > > if(!C_demand(931)){ > C_save(t1); > C_reclaim((void*)toplevel_trampoline,NULL);} > > keeps getting run; this is what's calling the C_reclaim() over and > over again. In fact, it seems that execution never makes it out of > this loop; just these three lines ad infinitum. > > I found that the result of C_demand is based on C_stack_pointer and > C_stack_limit. I was unable to determine the former using GDB, but in > this case C_stack_limit is always 0x7FFF83326C30. > > Hope this helps. I've put my library.c on my website, since it seems > to be generated code: http://real.metasyntax.net:2357/tmp/library.c.gz Well done, Taylor. Chicken coalesces all allocations inside a single generated C procedure and allocates it as one chunk. It seems here that the stack is already too small to hold the data, even after a minor GC was invoked. Can you reproduce the hang with larger settings for "-:s..."? If you add "-:d", you should see messages like [debug] stack resized to XXXX bytes If you can't reproduce the hang with higher settings, change the makefile (defaults.make or rules.make and pass "-:s<goodvalue>" to the "chicken-boot" invocations and look how far it gets (BTW, what does "./chicken-boot -:d" show?) Then we probably have a precompiled bootstrapping compiler with a too low nursery setting, even though this used to work. It also may be something completely different. cheers, felix _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users