Skip to content

Commit af91201

Browse files
committed
GLCI: also test with gcc -fsanitize=...
1 parent 5483d48 commit af91201

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

.gitlab-ci.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ test-lin-ancient-cran:
218218
# Restore checking vignettes if upgrading our R dependency means knitr can be installed, or when we switch to litedown.
219219
- R CMD check --no-manual --no-build-vignettes --ignore-vignettes $(ls -1t data.table_*.tar.gz | head -n 1)
220220

221-
# run the main checks with Address(+Leak),UBSanitizer enabled
222-
test-lin-dev-san:
221+
# run the main checks with Address(+Leak),UBSanitizer enabled, GCC _and_ Clang
222+
test-lin-dev-clang-san:
223223
<<: *test-lin
224224
image: registry.gitlab.com/rdatatable/dockerfiles/r-devel-clang-san
225225
variables:
@@ -236,6 +236,23 @@ test-lin-dev-san:
236236
# fail if R CMD check had failed or if sanitizer output found
237237
if [ $res1 -ne 0 ] || [ $res2 -ne 0 ]; then exit 1; fi
238238
239+
test-lin-dev-gcc-san:
240+
<<: *test-lin
241+
image: registry.gitlab.com/rdatatable/dockerfiles/r-devel-gcc-san
242+
variables:
243+
# must be set for most of the process because there are pseudo-leaks everywhere
244+
ASAN_OPTIONS: "detect_leaks=0"
245+
# fontconfig is known to leak; add more suppressions as discovered
246+
LSAN_OPTIONS: "suppressions=$CI_PROJECT_DIR/.dev/lsan.supp"
247+
UBSAN_OPTIONS: "print_stacktrace=1"
248+
script:
249+
- *install-deps
250+
- |
251+
res1=0; ASAN_OPTIONS=detect_leaks=1 R CMD check --no-manual $(ls -1t data.table_*.tar.gz | head -n 1) || res1=$?
252+
res2=0; perl -nle '(print, $a=1) if /: runtime error: |ERROR: LeakSanitizer/../SUMMARY.*Sanitizer/ }{ exit $a' data.table.Rcheck/**/*.Rout* || res2=$?
253+
# fail if R CMD check had failed or if sanitizer output found
254+
if [ $res1 -ne 0 ] || [ $res2 -ne 0 ]; then exit 1; fi
255+
239256
.test-win-template: &test-win
240257
<<: *test
241258
tags:
@@ -338,7 +355,7 @@ integration:
338355
- saas-linux-medium-amd64
339356
only:
340357
- master
341-
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-dev-san","test-win-rel","test-win-dev" ,"test-win-old","test-mac-rel","test-mac-old"]
358+
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-dev-clang-san","test-lin-dev-gcc-san","test-win-rel","test-win-dev" ,"test-win-old","test-mac-rel","test-mac-old"]
342359
script:
343360
- R --version
344361
- *install-deps ## markdown pkg not present in r-pkgdown image

0 commit comments

Comments
 (0)