Skip to content

Commit f218563

Browse files
committed
Run the sanitizer-enabled checks on GitLab CI
Also, add a temporary suppression for R's .Call() due to a minor 'bit' problem.
1 parent 4a7618a commit f218563

File tree

4 files changed

+22
-82
lines changed

4 files changed

+22
-82
lines changed

.dev/ubsan.supp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# TODO(bit>4.5.0.1): remove after a new 'bit' version is on CRAN
2+
function:R_doDotCall

.github/workflows/sanitizers.yaml

Lines changed: 0 additions & 81 deletions
This file was deleted.

.gitlab-ci.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,25 @@ test-lin-ancient-cran:
212212
# Restore checking vignettes if upgrading our R dependency means knitr can be installed.
213213
- R CMD check --no-manual --no-build-vignettes --ignore-vignettes $(ls -1t data.table_*.tar.gz | head -n 1)
214214

215+
# run the main checks with Address(+Leak),UBSanitizer enabled
216+
test-lin-san:
217+
<<: *test-lin
218+
image: docker.io/rocker/r-devel-ubsan-clang
219+
variables:
220+
# must be set for most of the process because there are pseudo-leaks everywhere
221+
ASAN_OPTIONS: "detect_leaks=0"
222+
# fontconfig is known to leak; add more suppressions as discovered
223+
LSAN_OPTIONS: "suppressions=$CI_PROJECT_DIR/.dev/lsan.supp"
224+
UBSAN_OPTIONS: "suppressions=$CI_PROJECT_DIR/.dev/ubsan.supp"
225+
script:
226+
- ln -svf "$(which RDscript)" "$(which Rscript)" # install-deps will run 'Rscript', we need R-devel+sanitizers
227+
- *install-deps
228+
- >-
229+
ASAN_OPTIONS=detect_leaks=1 RD CMD check --no-manual $(ls -1t data.table_*.tar.gz | head -n 1); res1=$?
230+
perl -nle '(print, $a=1) if /: runtime error: |ERROR: LeakSanitizer/../SUMMARY.*Sanitizer/ }{ exit $a' data.table.Rcheck/**/*.Rout*; res2=$?
231+
# fail if R CMD check had failed or if sanitizer output found
232+
[ $res1 -eq 0 ] && [ $res2 -eq 0 ]
233+
215234
.test-win-template: &test-win
216235
<<: *test
217236
tags:
@@ -311,7 +330,7 @@ integration:
311330
- saas-linux-medium-amd64
312331
only:
313332
- master
314-
needs: ["mirror-packages","build","test-lin-rel","test-lin-rel-cran","test-lin-dev-gcc-strict-cran","test-lin-dev-clang-cran","test-lin-rel-vanilla","test-lin-ancient-cran","test-win-rel","test-win-dev" ,"test-win-old","test-mac-rel","test-mac-old"]
333+
needs: ["mirror-packages","build","test-lin-rel","test-lin-rel-cran","test-lin-dev-gcc-strict-cran","test-lin-dev-clang-cran","test-lin-rel-vanilla","test-lin-ancient-cran","test-lin-san","test-win-rel","test-win-dev" ,"test-win-old","test-mac-rel","test-mac-old"]
315334
script:
316335
- R --version
317336
- *install-deps ## markdown pkg not present in r-pkgdown image

0 commit comments

Comments
 (0)