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
Segfault in compiled program #462
Comments
Try changing
to
Sorry, just realized that gets you a bit further but there is still a segfault |
It seems that the continuation context escapes it's scope in the iter method, and the resumption isn't valid for whatever reason. This is definitely a bug, though I'm not certain whether it should be a type error or there is something not being handled properly in the effect runtime. I think normally I would suggest changing the |
Thanks for your response. Good to know that the trace function is safer to use than my custom debug function. |
Ah this is indeed a real bug :-( -- I tried to run with |
Maybe it has to do with the |
The resume function escapes the handler. Is that supported? The compiler builds up a resumption for general ctl operations, but I was unaware whether it includes in the resumption a Deep resumption reinstalling the handler if it has escaped the handler's scope. |
Ah yes -- it should be written as:
(.. but if you forget this there should be an error message at runtime). However, even with this change the program still crashes, it must be something else -- I think it happens earlier? Btw. The |
Unlikely to be the same issue, but #360 also relates to the effect handler runtime. |
I was experimenting with some parser code while I hit a segfault. I was not able to shrink the reproduction unfortunately.
I've added a few debugging statements which are hopefully helpful. The output of the program is:
Since github shows the entire block of code verbatim in this post, I've created a gist for the reproduction code:
https://gist.github.com/chtenb/35410c6c66581cf5fd81ff1be697da9a
The text was updated successfully, but these errors were encountered: