Skip to content
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

Feature/add more shields #1011

Merged
merged 3 commits into from Nov 4, 2019
Merged

Feature/add more shields #1011

merged 3 commits into from Nov 4, 2019

Conversation

@eddelbuettel
Copy link
Member

eddelbuettel commented Nov 2, 2019

As discussed in #1010, a few more unprotected temporaries were floating around. This attempts to cover a few more.

@kevinushey give it a look when you have a moment

eddelbuettel added 3 commits Nov 2, 2019
@eddelbuettel eddelbuettel requested a review from kevinushey Nov 2, 2019
@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Nov 2, 2019

Codecov Report

Merging #1011 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1011   +/-   ##
=======================================
  Coverage   82.46%   82.46%           
=======================================
  Files          63       63           
  Lines        3166     3166           
=======================================
  Hits         2611     2611           
  Misses        555      555
Impacted Files Coverage Δ
inst/include/Rcpp/Environment.h 100% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 76c0ab1...da4b705. Read the comment docs.

Rf_lang4(removeSym, Rf_mkString(name.c_str()), Storage::get__(), Rf_ScalarLogical( FALSE ))
) );
Shield<SEXP> str(Rf_mkString(name.c_str()));
Shield<SEXP> call(Rf_lang2(internalSym, Rf_lang4(removeSym, str, Storage::get__(), Rf_ScalarLogical(FALSE))));

This comment has been minimized.

Copy link
@kevinushey

kevinushey Nov 4, 2019

Contributor

It may also be worth pulling out Rf_lang4() from this call and protecting that as well, since IIUC that will be an unprotected R object being passed into Rf_lang2(), and so in theory could be cleaned up by the GC when the pairlist created in Rf_lang2() is allocated..

This comment has been minimized.

Copy link
@kevinushey

kevinushey Nov 4, 2019

Contributor

Hmm, I might be wrong. IIUC, each of the lang* helper functions protects the arguments passed in, before the final call is created:

https://github.com/wch/r-source/blob/eafae2b2ed39b3383943cd6c36f92d78f966811e/src/include/Rinlinedfuns.h#L629-L677

So this pattern should in fact be safe.

Copy link
Contributor

kevinushey left a comment

LGTM!

@eddelbuettel eddelbuettel merged commit ee0a5b8 into master Nov 4, 2019
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@eddelbuettel eddelbuettel deleted the feature/add_more_shields branch Nov 4, 2019
@eddelbuettel

This comment has been minimized.

Copy link
Member Author

eddelbuettel commented Nov 4, 2019

For completeness, the reverse dependsn check results are at RcppCore/rcpp-logs@74e007b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.