r-debug icon indicating copy to clipboard operation
r-debug copied to clipboard

RDsan includes only address sanitizers

Open brodieG opened this issue 2 years ago • 0 comments

I'm guessing this is happening due to a combination of documented difficulties in building R with the GCC UB sanitizer, and the problems caused by ~/.R/Makevars affecting all builds, but the net of it is RDsan does not run the undefined behavior sanitizer. I tried this horrible hack:

echo 'CC=gcc -std=gnu99 -fsanitize=undefined -fno-omit-frame-pointer' > \
  ~/.R/Makevars &&
  RDsan &&
  rm ~/.R/Makevars

And was able to get the UB sanitizer to run for RDsan built packages. My shell scripting capabilities are extremely limited, and my R build configuration ones only slightly less so, so I don't have an elegant solution to propose to address this.

Failing a fix, it might be worth updating the documentation to highlight that RDsan, unlike RDcsan, only does address sanitizing for installed packags.

Thanks for this docker container though. It's been a life saver many times.

brodieG avatar Jan 11 '22 11:01 brodieG