-
Notifications
You must be signed in to change notification settings - Fork 174
kernel: close streams after internal exception #5896
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
kernel: close streams after internal exception #5896
Conversation
If you are going to try/catch in these functions, I think you need to make all the variables volatile so they are compatible with longjmp/setjmp? (could do it selectively, but probably easiest to just do everything) |
In most of the changes, register clobbering is no problem: if we There is one exception: in |
@ChrisJefferson thoughts? |
Is "large so never stored in a register" sufficient? This being C, my assumption is the compiler will mess up the code at high optimisation, just because it can? |
My thoughts on this:
I hope we can then merge it so I can get rid of this pesky crash (which seems difficult to trigger in pure GAP but I can trigger it in GAP.jl because the runtime environment is slightly different there) |
... then rethrow. Otherwise we may end up with references to input/output stream objects on the stack that are invalid.
800163a
to
4d9f0c4
Compare
This reverts commit 4d9f0c4.
Adding
Hrm |
... then rethrow.
Otherwise we may end up with references to input/output stream objects on the stack that are invalid.
I am actually not sure why this worked so far w/o causing us crashes in various situations. I think I reasoned this through at some point in the distant past and convinced myself the code is fine as it is, but I don't see it anymore. In any case, even if for some reason it was OK after all, I feel it is better to explicitly deal with this.
Diffs best viewed with "ignore whitespace" turned on.