Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upUnbalanced 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
Sheltermay callUNPROTECTwith highernthan the number ofPROTECTcalls it issued because it increments thenprotectedmember even forNILSXPs, which are however ignored inRcpp_protect. This does not cause a crash on GNU-R for some reason, but if there are some preexistingSEXPs 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