Re: [R-pkg-devel] "Additional issues" show WRITE outside an array

2019-07-26 Thread Ivan Krylov
On Fri, 26 Jul 2019 01:50:36 -0500
Jiahuan ye  wrote:

> I am very confused what causes the ERROR.

Your code on line 197 of src/min_wgss.cpp causes memory access outside
the block that had been allocated for the best_change_point vector.

I have not read the code in depth, but it looks like the length of
best_change_point should be M at this point. Array indices on the C++
side start with 0 and end at (length-1), so erasing the element at
position M in a NumericVector of length M in Rcpp code results in
undefined behaviour.

-- 
Best regards,
Ivan

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] "Additional issues" show WRITE outside an array

2019-07-26 Thread Uwe Ligges
Checks with address sanitizers have to be done with instrumnted R 
versions and take a long time, hence we run these checks less frequently 
and only under one platform (here Linux for simplicity).


Best,
Uwe Ligges




On 26.07.2019 08:50, Jiahuan ye wrote:

Hi,

Recently, my first r package offlineChange

was uploaded to CRAN, and there are three errors. I already figured out
that two of the three errors are that the depend and import are
inconsistent:

Depends:R (≥ 3.5.0)
Imports:graphics (≥ 3.6.0), utils (≥ 3.6.0), stats (≥ 3.5.1), Rcpp
(≥ 1.0.1)

But for the last ERROR, which only appears under r-patched-linux-x86_64
,
I still can't figure it out.

And there is also an additional issue that I think is related with the
above ERROR:
gcc-ASAN 

[R-pkg-devel] "Additional issues" show WRITE outside an array

2019-07-26 Thread Jiahuan ye
Hi,

Recently, my first r package offlineChange

was uploaded to CRAN, and there are three errors. I already figured out
that two of the three errors are that the depend and import are
inconsistent:

Depends:R (≥ 3.5.0)
Imports:graphics (≥ 3.6.0), utils (≥ 3.6.0), stats (≥ 3.5.1), Rcpp
(≥ 1.0.1)

But for the last ERROR, which only appears under r-patched-linux-x86_64
,
I still can't figure it out.

And there is also an additional issue that I think is related with the
above ERROR:
gcc-ASAN 
I am very confused what causes the ERROR. When I tested under windows, the
package works well. And there is error in my codes, why does the ERROR only
appear under linux with certain R version?

Thank you for your help.

Best,
Jiahuan

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel