From 52332a20244b15af082b7cb12242b83f97224dfa Mon Sep 17 00:00:00 2001 From: mxaddict Date: Mon, 19 Feb 2024 21:30:07 +0800 Subject: [PATCH] [MSan] updates --- ci/test/03_test_script.sh | 1 + src/blsct/arith/mcl/mcl_init.h | 11 +---------- test/sanitizer_suppressions/msan | 1 - 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/ci/test/03_test_script.sh b/ci/test/03_test_script.sh index 4c4fd0ec98146d..a31da9c9549982 100755 --- a/ci/test/03_test_script.sh +++ b/ci/test/03_test_script.sh @@ -10,6 +10,7 @@ set -ex export ASAN_OPTIONS="detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1" export LSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/lsan" +export MSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/msan" export TSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/tsan:halt_on_error=1:log_path=${BASE_SCRATCH_DIR}/sanitizer-output/tsan" export UBSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:report_error_type=1" diff --git a/src/blsct/arith/mcl/mcl_init.h b/src/blsct/arith/mcl/mcl_init.h index b3b881cec64f55..76132cba7b50b6 100644 --- a/src/blsct/arith/mcl/mcl_init.h +++ b/src/blsct/arith/mcl/mcl_init.h @@ -35,16 +35,7 @@ class MclInit static bool is_initialized = false; if (is_initialized) return; -#ifndef MCLBN_COMPILED_TIME_VAR - int compiledTimeVar = 0; -#else - int compiledTimeVar = MCLBN_COMPILED_TIME_VAR; -#endif - - if (blsInit( - MCL_BLS12_381, - compiledTimeVar - ) != 0) { + if (blsInit(MCL_BLS12_381, MCLBN_COMPILED_TIME_VAR) != 0) { throw std::runtime_error("blsInit failed"); } mclBn_setETHserialization(1); diff --git a/test/sanitizer_suppressions/msan b/test/sanitizer_suppressions/msan index b8d7383562ff3c..8a6f0684546c98 100644 --- a/test/sanitizer_suppressions/msan +++ b/test/sanitizer_suppressions/msan @@ -1,4 +1,3 @@ [memory] # false-positive in mcl fun:*mcl* -