GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||
GeezerVison is showing github.com — add template specializations to avoid DATAPTR use by kevinushey · Pull Request #1310 · RcppCore/Rcpp Conversation
|
|
Nice stuff. Would you mind if I spend the usual day or two and a half on rev.deps, "just in case" ? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Nice implementation, LGTM! Given that these now are going to be ASAN errors on CRAN anyways, I'd say it's fine if they trigger errors from our side. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Very true but it may make updating at CRAN harder for us if we trigger N new things in M packages. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
86cf6ba to
69cb4dd
Compare
For sure -- we could also consider whether we should allow users (or CRAN) to configure whether out-of-bounds checks should be errors, warnings, or something else. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Three hours in (had some follow-up to do on RcppArmadillo run first)
2 of the 3 are out of bounds (aum, BART) the third is small numerical diff on test so maybe not us (bayesianVars). PS1: Twelve hours in:
PS2: Twentyfour hours in
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Will look forward to seeing whether this resolves lme4/lme4#794 (still hoping that what we're seeing is not the revealing of previously cryptic out-of-bounds accesses, but rather things that are legal but trigger an ASAN warning anyway ...) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The reverse depends run finished just as I was leaving for a two-day bike trip. The results are not terrible but also not something which makes me think we can commit this as is: Almost all the 'fails' are due to run-time and not install-time so it could be the 'harsher' out of bounds access. I will try to summarize later. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@kevinushey With the extra delay of me disappearing for 1 1/2 or 2 days 😀 I was now able to summarize the reverse dependency run. As logged, it is essentially 'out of bounds'. So we probably want to preemptively define the 'death by bounds check' away, or maybe tone it down to a message. PS I played a little with a simple define to avoid the current |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Most of them already have ASAN/UBSAN errors on CRAN, and the others will likely have them when the CRAN machinery reaches them. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I am much less sanguine here as we are (by the standard release pattern) looking into a release in two week (early July) to four weeks (mid July). I think we need to address this, or possibly roll it to the next release with sufficient time to communicate to affected maintainers. (Also, package |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Then, let's make it a warning for now and an error in the next release? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I ran into errors when I mod'ed it to 'continue' rather than @kevinushey Any insights from your end? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Thanks for the update, @kevinushey -- I will give this a spin in another reverse-dependency run. Another thing I noticed was that if one where to define the 'off-switch' the code doesn't actually compile cleanly. I tried this diff diff --git a/inst/include/Rcpp/vector/Subsetter.h b/inst/include/Rcpp/vector/Subsetter.h index 0d8b32a6..0905e1a3 100644 --- a/inst/include/Rcpp/vector/Subsetter.h +++ b/inst/include/Rcpp/vector/Subsetter.h @@ -147,7 +147,7 @@ private: } #else template <typename IDX> - void check_indices(IDX* x, IDX n, IDX size) {} + void check_indices(IDX* x, R_xlen_t n, R_xlen_t size) {} #endif void get_indices( traits::identity< traits::int2type<INTSXP> > t ) { Can you take a peek? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Should be good now. We now give a warning rather than a hard error; I indicated in NEWS that this might change in the future. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
In one spot. You left a stop() in the other. On purpose? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I left https://github.com/RcppCore/Rcpp/pull/1310/files#diff-4d30eca18cf4d872269fc011605a047e2212875dcb25688bd2460986c632064bL144 alone because that was pre-existing code (we already gave a hard error in those cases) but I can switch that to a warning if we want to be uniform? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Oh, I completely missed that we already stopped there / that that bit was not new code. My bad! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
So I ran another reverse dependency check, and the result summary is here. It has seven failures of which one is due to missing build dependencies and at least one is recurrent leaving five. One is possibly local / spurious (connection issue), leaving four. CRAN may let me get away with arguing that the DATAPTR improvement is worth it. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
We are down to five now. One is possibly a test setup issue 1. One is a package for which CRAN requested other changes. I will open an issue here with links and try to get in touch with the maintainers -- but first things first: I will merge this, and then make a new incremental release 1.0.12.4 with this merged and make it available via the drat (and r-universe) so that the affected maintainers can test with it. Footnotes
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think this is ready now. Big thank you for preparing it!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.