-
-
Notifications
You must be signed in to change notification settings - Fork 217
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
Clean up (or remove) protect-unwind API and Rcpp_fast_eval #807
Comments
The RStudio team is going to be getting together in San Diego next week after rstudio::conf so hopefully @lionel- and I will have time to sit down and take a closer look. The fact that the unwind stuff uniformly crashes on Windows is not promising, though (even with Rcpp out of the picture) |
Good news from Luke Tierney: he was able to reproduce the unwind crash I had seen on macOS / Linux and has a fix in R-devel for that. If we reintroduce the usage of the unwind API we might still have to keep it turned off on Windows, though. (I think the crash may be toolchain related, but need to investigate a little more) |
@lionel- Rcpp 0.12.16 is out, so we would have some time to do damage if you want to revisit this now. Later is fine too. |
Thanks I'll revisit within a few weeks. |
|
Looks like it was you who put it there, so there are no other users yet. In that sense we could make that change. But wasn't there some other verboten, don't do that state around longjumps? Or is my memory foggy? |
Are you referring to catching a LongjumpException? For protect-unwind it should be fine to continue a longjump with a token from someone else as long as the token was validly generated. So LongjumpException shouldn't be caught by a third party without being rethrown (otherwise the longjump is interrupted and the token memory is leaked), but it's fine for a third party to throw their own LongjumpException. This also means LongjumpException has to be public so it can be rethrown before a Oh hmm maybe we need to think through what happens when another token is rethrown from a destructor (that could happen for instance if Edit: Ah we can release the token from the exception dtor. However it seems we can't guarantee proper propagation of an R longjump from a dtor because there might be another thrown exception on the stack. With C++11 it seems we might be able to get a hold on the longjump exception currently being thrown (with |
Sounds like something where we'd probably want to pass a spec or design to Luke for a glance at it. |
@lionel- Gentle poke. It is not urgent -- I'll probably prepare the next Rcpp release this week but if this is something we want to come back to for the next cycle let me know. |
Thanks, I'm planning to work on this the week after eRum. |
Done in #859 -- with a big thank you! |
No worries! I hope all issues are now resolved... Let me know if anything comes up. |
We just got a new one -- both for me and for @coatless on macOS -- the 'embedded' code submitted by Filip. Not sure it is related, and don't mean to imply that, but it is something new. :-/ |
Yes this is unrelated to the new eval stuff. You can solve this by sourcing in a child of the base env in https://github.com/RcppCore/Rcpp/blob/master/inst/unitTests/runit.embeddedR.R#L30. newEnv <- new.env(parent = baseenv())
...
newEnv2 <- new.env(parent = baseenv()) However I am not sure why there's a dangling What's weird is that it doesn't always fail. |
Shall we open a new ticket for this? We all (ie Rcpp Core, @filipsch , ...) would probably benefit from what you know about environments and scoping... |
Hmm it could also be in
Sure though I'm not sure when I'll have time to investigate this. |
That's ok, we are all busy as hell. @filipsch is the one who needs it and is most likely to drive this. If you can just help him by answering questions on ideas, code, design, approach,... it would help. Else I may be forced to revert this as I am unlikely to release 0.12.18 with a known failure. |
By "this" you mean #852 right? It's unlikely to have introduced a new problem, the issue must be already there (perhaps in Rcpp but more likely in the unit tests). |
Yes, what I turned off for now in this commit 5d5cdb8. |
So #789 by @lionel- turned out to have had side effects. It is currently in hiding and
#ifdef
-ed away.We could try to clean it up for the next release in March, or maybe the one thereafter in May (if we keep the same cadence). If we don't then we should take it out at some point. No rush, but should not get forgotten either.
The text was updated successfully, but these errors were encountered: