- Download R
wget https://cran.r-project.org/src/base/R-4/R-4.0.2.tar.gz
tar -xzf R-4.0.2.tar.gz
mv R-4.0.2 /opt
cd /opt/R-4.0.2- Set environment to make R slow, but easy to debug.
export CFLAGS="-O0 -g"- Build R
./configure && make(add missing dependencies etc.)
- Add some libs that will be needed.
bin/RAnd in R:
install.packages(c("testthat", "devtools", "dplyr", "knitr"));
devtools::install_github("PRL-PRG/viewports");
q();- Get UFOs repo
git clone https://github.com/PRL-PRG/UFOs.git PATH/UFOs- Install packages
bin/R CMD INSTALL PATH/UFOs/ufos --clean
bin/R CMD INSTALL PATH/UFOs/ufovectors --clean- Open R with gdb attached
bin/R -d gdbrsetwd("PATH/UFOs/ufovectors"); devtools::test()- Experience SEGFAULT
The code that runs during tests is in ufovectors:
- tests/testthat/test-empty-vectors.R, and then
- rests/testthat/test-file-backed-sum.R
It looks like both of these are necessary to make the SEGFAULT happen.