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 upUBSAN issues: RcppParallel #52
Comments
|
I had hoped that setting At any rate, if I take the relevant bits of RcppParallel, add it to an If there is any good news to doing things this way, it's that we don't need a If I have to go down this road, perhaps maintenance would be simpler (at the cost of more up-front work) by keeping only what is necessary for the parallel-for code, adapting it for |
#52: Use RcppParallel subset directly
|
There's a new version of RcppParallel out that seems to fix these issues, but I have stuck with a |
jlmelville#52: Use RcppParallel subset directly
Running
rhub::check_with_sanitizers()has confirmed that the UBSAN issues reported for RcppAnnoy in #50 are fixed with RcppAnnoy 0.0.15. Unfortunately, there are lots of UBSAN complaints originating with RcppParallel. I don't think this is due to me using the package incorrectly, because the RcppParallel CRAN checks give the same messages (see https://www.stats.ox.ac.uk/pub/bdr/memtests/gcc-UBSAN/RcppParallel/RcppParallel-Ex.Rout).They seem to originate with the Intel tbb library and are well known by the RcppParallel maintainers (see e.g. RcppCore/RcppParallel#36), but they can't do anything about it. The risk here is that the strategy of saying that the UBSAN issues are harmless and originate from a package uwot is using is exactly the strategy that stopped working with RcppAnnoy.
A possible alternative is to look at RcppThread which has a parallel for construct and is not currently showing any check problems.