-
-
Notifications
You must be signed in to change notification settings - Fork 208
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
Unbalanced PROTECT/UNPROTECT in the Shelter class #935
Comments
Thanks for filing the issue -- that looks plausible. I can make the change and launch a rev.dep check so see if anything bubbles up. |
I had some issues with the reverse-depends check environment which, to cut a long story short, needed to be rebuilt. I am almost done and nothing has come up so I'll make this change 'real soon now'. |
@eddelbuettel this can be closed out as PR #940 was merged in. |
Indeed. |
It seems that
Shelter
may callUNPROTECT
with highern
than the number ofPROTECT
calls it issued because it increments thenprotected
member even forNILSXP
s, which are however ignored inRcpp_protect
. This does not cause a crash on GNU-R for some reason, but if there are some preexistingSEXP
s on the protection stack, it may pop them out unintentionally.Suggested patch:
the same measure is already taken in
Shield
:Some code snippets that trigger this issue were reported to FastR, but as noted above, they do not cause any observable issues on GNU-R
oracle/fastr#53
oracle/fastr#50
The text was updated successfully, but these errors were encountered: