-
-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
APPLY does not terminate on a circular list #684
Comments
Thanks a lot for testing these cases! It would be really neat to have a survey of how the primitives in different Scheme implementations handle circular lists. schemedoc/surveys? |
This is a very specific case, I don't think worth surveying. Though if you do, maybe coordinate with John, his wg2 repo tracks which scheme supports what feature for a lot of schemes and features. |
Definitely. With the docker containers we could even do a simple framework for automated test cases. Send some input to the REPL, expect a particular set of outputs and record the results. |
Good catch. Fix pushed. We still don't detect if the argument is an infinite lazy list---in which case, the process eventually exhaust memory. But actually, we don't need to realize the lazy list entirely; we only need up to the number of required arguments. That'll be another task. |
Wow. It's good that I reported instead of attempting to fix myself. I didn't see all that. Since lazy list problem is already tracked, I'll close this one. Thanks! |
This is a mirror of ashinn/chibi-scheme#629. While chibi segfaults, Gauche runs forever.
I looked at the backtrace with gdb and it looks like when
GAUCHE_LAZY_PAIR
is on,check_arglist_tail_for_apply()
does not handle circular list correctly. The other version, which usesScm_Length()
, does handle it and terminates withPS. Gauche cannot be compiled with GAUCHE_LAZY_PAIR set to zero anymore (undefined symbols). Might as well simplify the code and get rid of non-lazy code paths.
The text was updated successfully, but these errors were encountered: