From 3adbd6fbee1af752c0dae017f684a30aef7f2029 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 20 Feb 2025 11:01:39 +0100 Subject: [PATCH 1/3] use ignorelist in USAN job --- .gitlab-ci.yml | 10 ++++++++-- Makefile | 6 +++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1bc5a6f07..855f5d571 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -553,9 +553,15 @@ stages: - *copy-ltv-files-to-testv-dir - python3 ci/remove_unsupported_testcases.py $PRM_FILES - *build-reference-and-dut-binaries + + - make_args="CLANG=$CLANG_NUM" + - if [[ $CLANG_NUM == 3 ]]; then + - export UBSAN_OPTIONS="suppressions=scripts/ubsan_basop.supp,report_error_type=1" + - python3 scripts/basop_create_ignorelist_for_ubsan.py + - make_args="$make_args IGNORELIST=1" + - fi - make clean - - make -j CLANG=$CLANG_NUM - - if [[ $CLANG_NUM == 3 ]]; then export UBSAN_OPTIONS="suppressions=scripts/ubsan_basop.supp,report_error_type=1"; fi + - make -j $make_args - testcase_timeout=$TESTCASE_TIMEOUT_LTV_SANITIZERS - python3 -m pytest $TEST_SUITE -v --tb=no --update_ref 1 --html=report.html --self-contained-html --junit-xml=report-junit.xml --testcase_timeout $testcase_timeout --ref_encoder_path $DUT_ENCODER_PATH --ref_decoder_path $DUT_DECODER_PATH artifacts: diff --git a/Makefile b/Makefile index 4e92bc951..e444cc54b 100644 --- a/Makefile +++ b/Makefile @@ -82,10 +82,14 @@ ifeq "$(CLANG)" "3" CC = $(CCCLANG) # NOTE: keep in sync with list in CMakeLists.txt usan_checks = undefined,float-divide-by-zero,implicit-conversion,local-bounds -CFLAGS += -fsanitize=$(usan_checks) +CFLAGS += -fsanitize=$(usan_checks) CFLAGS += -fsanitize-recover=$(usan_checks) LDFLAGS += -fsanitize=$(usan_checks) LDFLAGS += -fsanitize-recover=$(usan_checks) + +ifeq "$(IGNORELIST)" "1" +CFLAGS += -fsanitize-ignorelist=ubsan_ignorelist.txt +LDFLAGS += -fsanitize-ignorelist=ubsan_ignorelist.txt endif ifeq "$(RELEASE)" "1" -- GitLab From f016e6dd8aa1358d8f459755d87fa721f8a40fa1 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 20 Feb 2025 12:27:45 +0100 Subject: [PATCH 2/3] fix missing endif --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index e444cc54b..9d18cbde3 100644 --- a/Makefile +++ b/Makefile @@ -91,6 +91,7 @@ ifeq "$(IGNORELIST)" "1" CFLAGS += -fsanitize-ignorelist=ubsan_ignorelist.txt LDFLAGS += -fsanitize-ignorelist=ubsan_ignorelist.txt endif +endif ifeq "$(RELEASE)" "1" CFLAGS += -DRELEASE -- GitLab From 550a38ef5fb2ae8ee48555504ae3b1b13b7d3a9c Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 20 Feb 2025 13:28:25 +0100 Subject: [PATCH 3/3] remove redundant builds and set bash strict mode --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 855f5d571..c1e56d48d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -552,8 +552,9 @@ stages: - *update-scripts-repo - *copy-ltv-files-to-testv-dir - python3 ci/remove_unsupported_testcases.py $PRM_FILES - - *build-reference-and-dut-binaries + - *build-reference-binaries + - set -euxo pipefail - make_args="CLANG=$CLANG_NUM" - if [[ $CLANG_NUM == 3 ]]; then - export UBSAN_OPTIONS="suppressions=scripts/ubsan_basop.supp,report_error_type=1" -- GitLab