Skip to content

Latest commit

 

History

History
73 lines (50 loc) · 1.06 KB

File metadata and controls

73 lines (50 loc) · 1.06 KB
  1. 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
  1. Set environment to make R slow, but easy to debug.
export CFLAGS="-O0 -g"
  1. Build R
./configure && make

(add missing dependencies etc.)

  1. Add some libs that will be needed.
bin/R

And in R:

install.packages(c("testthat", "devtools", "dplyr", "knitr"));
devtools::install_github("PRL-PRG/viewports");
q();
  1. Get UFOs repo
git clone https://github.com/PRL-PRG/UFOs.git PATH/UFOs
  1. Install packages
bin/R CMD INSTALL PATH/UFOs/ufos --clean
bin/R CMD INSTALL PATH/UFOs/ufovectors --clean
  1. Open R with gdb attached
bin/R -d gdb
r
setwd("PATH/UFOs/ufovectors"); devtools::test()
  1. 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.