[Rcpp-devel] Runtime error from Rcpp::depends with gcc sanitizers

Ralf Stubner ralf.stubner at daqana.com
Tue Feb 12 14:10:12 CET 2019


Hi list,

I run into run-time errors when using rhub::check_with_sanitizers(),
which can be reproduced like this:

$ docker run -it --rm rhub/rocker-gcc-san bash
root at c56cfa20e903:/# RDscript -e "install.packages('Rcpp')"
[...]
root at c56cfa20e903:/# cat > foo.cpp
#include <Rcpp.h>
// [[Rcpp::depends(Matrix)]]

// [[Rcpp::export]]
int foo() { return 0; }

root at c56cfa20e903:/# RDscript -e "Rcpp::sourceCpp('foo.cpp')"
attributes.cpp:168:11: runtime error: load of value 104, which is not a
valid value for type 'bool'
attributes.cpp:168:11: runtime error: load of value 2, which is not a
valid value for type 'bool'

There is no error if I omit Rcpp::depends:

root at c56cfa20e903:/# cat > bar.cpp
#include <Rcpp.h>

// [[Rcpp::export]]
int foo() { return 0; }

root at c56cfa20e903:/# RDscript -e "Rcpp::sourceCpp('bar.cpp')"
root at c56cfa20e903:/#

These errors do not occur in the tests run by CRAN (or they are filtered
out there). Does anyone have an idea where this might come from and how
it could be fixed?

Thanks
Ralf

-- 
Ralf Stubner
Senior Software Engineer / Trainer

daqana GmbH
Dortustraße 48
14467 Potsdam

T: +49 331 23 61 93 11
F: +49 331 23 61 93 90
M: +49 162 20 91 196
Mail: ralf.stubner at daqana.com

Sitz: Potsdam
Register: AG Potsdam HRB 27966
Ust.-IdNr.: DE300072622
Geschäftsführer: Dr.-Ing. Stefan Knirsch, Prof. Dr. Dr. Karl-Kuno Kunze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20190212/a4f3c99f/attachment.sig>


More information about the Rcpp-devel mailing list