[R-pkg-devel] Tracking down cause of UBSAN error
To add to Dirk's summary of the available options, you might find it useful
to borrow from the setup that we use to replicate CRAN's UBSAN checks on
GitHub Actions for {lightgbm}.
https://github.com/microsoft/LightGBM/blob/0c1c36cdbdf771a03c9ae0873eb28585e6c3d624/.github/workflows/r_package.yml#L162-L186
I was able to reproduce all of the specific issues in {lightgbm} that
showed up on CRAN's UBSAN checks with this setup, which uses the
rhub/rocker-gcc-san image. It should be easy enough to switch that to the
images from https://github.com/wch/r-debug if necessary.
Hope that it helps!
-James
On Thu, Oct 15, 2020 at 9:08 PM Dirk Eddelbuettel <edd at debian.org> wrote:
Hugh, The different SAN/ASAB/UBSAN/... analysers depend critically on _exactly how_ the instrumentation is setup. That make the whole setup analysis a little brittle, and it is a real shame that neither CRAN nor some of the entities supposedly here in order to support R users and developers have managed to produced _standardized_ environments (using, say, Docker) to make this genuinely reproducible. So we all waste time chasing things over and over. Five or so years ago I wrote a first container for this; I believe the RHub one is a descendant of it. But I found reproducing errors so tricky that I set up an entire package just to provide 'true positives' for such tests of the testing framework: http://cloud.r-project.org/package=sanitizers It helps validate that the setup (container, say) catches what it is supposed to catch--as this is (too) easy to get wrong. These days I think the contains within the (very well done and complete) "collection" of containers maintained by Winston might be your best bet: https://github.com/wch/r-debug This is what I used last time I needed something like it. Hth, Dirk -- https://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
______________________________________________ R-package-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
James Lamb GitHub <https://github.com/jameslamb> | Twitter <https://twitter.com/_jameslamb> | LinkedIn <https://www.linkedin.com/in/jameslamb1/> [[alternative HTML version deleted]]