diff --git a/ci/ci-script.bash b/ci/ci-script.bash index 5b5013eba..0db86bbfc 100755 --- a/ci/ci-script.bash +++ b/ci/ci-script.bash @@ -90,9 +90,6 @@ elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then export VERILATOR_TEST_NO_GPROF=1 # gprof is a bit different on FreeBSD, disable fi - # Run sanitize on Ubuntu 22.04 only - ( [[ "$CI_RUNS_ON" =~ 'ubuntu-22.04' ]] || [[ "$CI_RUNS_ON" =~ 'ubuntu-24.04' ]] ) && sanitize='--sanitize' || sanitize='' - TEST_REGRESS=test_regress if [ "$CI_RELOC" == 1 ]; then # Testing that the installation is relocatable. @@ -113,16 +110,16 @@ elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then ccache -z case $TESTS in dist-vlt-0) - "$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean $sanitize" DRIVER_HASHSET=--hashset=0/4 + "$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean" DRIVER_HASHSET=--hashset=0/4 ;; dist-vlt-1) - "$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean $sanitize" DRIVER_HASHSET=--hashset=1/4 + "$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean" DRIVER_HASHSET=--hashset=1/4 ;; dist-vlt-2) - "$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean $sanitize" DRIVER_HASHSET=--hashset=2/4 + "$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean" DRIVER_HASHSET=--hashset=2/4 ;; dist-vlt-3) - "$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean $sanitize" DRIVER_HASHSET=--hashset=3/4 + "$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt --driver-clean" DRIVER_HASHSET=--hashset=3/4 ;; vltmt-0) "$MAKE" -C "$TEST_REGRESS" SCENARIOS="--vltmt --driver-clean" DRIVER_HASHSET=--hashset=0/3 diff --git a/docs/internals.rst b/docs/internals.rst index 9fa77ae2a..a2014c1c3 100644 --- a/docs/internals.rst +++ b/docs/internals.rst @@ -2242,11 +2242,6 @@ driver.py Non-Scenario Arguments --rrsim Run Verilator generated executable and record with ``rr``. ---sanitize - Enable address sanitizer to compile Verilated C++ code. This may detect - misuses of memory, such as out-of-bound accesses, use-after-free, and - memory leaks. - --site Run site-specific tests also. diff --git a/test_regress/driver.py b/test_regress/driver.py index b68f4eb42..83264817e 100755 --- a/test_regress/driver.py +++ b/test_regress/driver.py @@ -1033,7 +1033,6 @@ class VlTest: bool(re.search(r'-savable\b', checkflags))) self.coverage = ( # pylint: disable=attribute-defined-outside-init bool(re.search(r'-coverage\b', checkflags))) - self.sanitize = param.get('sanitize', None) # pylint: disable=attribute-defined-outside-init self.sc = ( # pylint: disable=attribute-defined-outside-init bool(re.search(r'-sc\b', checkflags))) self.timing = ( # pylint: disable=attribute-defined-outside-init @@ -1078,10 +1077,6 @@ class VlTest: verilator_flags += ["--threads", str(param['threads'])] if param['vltmt'] and re.search(r'-trace-fst ', checkflags): verilator_flags += ["--trace-threads 2"] - if self.sanitize: - verilator_flags += [ - "-CFLAGS -fsanitize=address,undefined -LDFLAGS -fsanitize=address,undefined" - ] if param['verilator_make_cmake']: verilator_flags += ["--make cmake"] if param['verilator_make_gmake']: @@ -2918,7 +2913,6 @@ if __name__ == '__main__': parser.add_argument('--rerun', action='store_true', help='rerun all tests that fail') parser.add_argument('--rr', action='store_true', help='run Verilator executable with rr') parser.add_argument('--rrsim', action='store_true', help='run Verilated executable with rr') - parser.add_argument('--sanitize', action='store_true', help='run address sanitizer') parser.add_argument('--site', action='store_true', help='include VERILATOR_TEST_SITE test list') diff --git a/test_regress/t/t_case_unique_many.py b/test_regress/t/t_case_unique_many.py index 15e80d521..4df7b8036 100755 --- a/test_regress/t/t_case_unique_many.py +++ b/test_regress/t/t_case_unique_many.py @@ -11,7 +11,7 @@ import vltest_bootstrap test.scenarios('simulator') -test.compile(verilator_flags2=["--assert"], sanitize=False) # GCC 11.4.0 hang bug +test.compile(verilator_flags2=["--assert"]) test.execute() diff --git a/test_regress/t/t_class_member_sens.py b/test_regress/t/t_class_member_sens.py index de7e2e82d..fc5a55e3f 100755 --- a/test_regress/t/t_class_member_sens.py +++ b/test_regress/t/t_class_member_sens.py @@ -11,8 +11,8 @@ import vltest_bootstrap test.scenarios('vlt') -test.compile(sanitize=True) +test.compile() -test.execute(aslr_off=True) # Some GCC versions hit an address-sanitizer bug otherwise) +test.execute() test.passes() diff --git a/test_regress/t/t_debug_sigsegv_bad.py b/test_regress/t/t_debug_sigsegv_bad.py index 3dac6153d..4a6710152 100755 --- a/test_regress/t/t_debug_sigsegv_bad.py +++ b/test_regress/t/t_debug_sigsegv_bad.py @@ -14,7 +14,7 @@ test.scenarios('vlt') test.setenv("ASAN_OPTIONS", "handle_segv=0") test.leak_check_disable() -test.lint(v_flags=["--debug-sigsegv"], fails='any', sanitize=0) +test.lint(v_flags=["--debug-sigsegv"], fails='any') test.file_grep(test.compile_log_filename, r'%Error: Verilator internal fault, sorry. Suggest trying --debug --gdbbt') diff --git a/test_regress/t/t_debug_sigsegv_bt_bad.py b/test_regress/t/t_debug_sigsegv_bt_bad.py index 569905790..17d6bfc52 100755 --- a/test_regress/t/t_debug_sigsegv_bt_bad.py +++ b/test_regress/t/t_debug_sigsegv_bt_bad.py @@ -16,9 +16,7 @@ if 'VERILATOR_TEST_NO_GDB' in os.environ: if not test.have_gdb: test.skip("No gdb installed") -test.lint(verilator_flags2=["--lint-only --debug --gdbbt --debug-sigsegv"], - sanitize=0, - fails='any') +test.lint(verilator_flags2=["--lint-only --debug --gdbbt --debug-sigsegv"], fails='any') test.file_grep(test.compile_log_filename, r'Program received signal SIGSEGV') test.file_grep(test.compile_log_filename, r'in V3Options::') diff --git a/test_regress/t/t_flag_runtime_debug.py b/test_regress/t/t_flag_runtime_debug.py index aabbbc531..c275d96fa 100755 --- a/test_regress/t/t_flag_runtime_debug.py +++ b/test_regress/t/t_flag_runtime_debug.py @@ -14,9 +14,7 @@ test.top_filename = "t/t_flag_main.v" test.compile(verilator_flags2=['--binary --runtime-debug']) -test.execute( - # Some GCC versions hit an address-sanitizer bug otherwise - aslr_off=True) +test.execute() test.file_grep(test.obj_dir + "/" + test.vm_prefix + ".mk", r'VL_DEBUG=1') diff --git a/test_regress/t/t_trace_ub_misaligned_address.py b/test_regress/t/t_trace_ub_misaligned_address.py index 8dba84376..e6729183e 100755 --- a/test_regress/t/t_trace_ub_misaligned_address.py +++ b/test_regress/t/t_trace_ub_misaligned_address.py @@ -12,14 +12,9 @@ import vltest_bootstrap test.scenarios('simulator') test.top_filename = "t/t_trace_ub_misaligned_address.v" -test.compile(verilator_flags2=[ - "--binary --trace-vcd", "-CFLAGS -fsanitize=address,undefined", - "-LDFLAGS -fsanitize=address,undefined" -]) +test.compile(verilator_flags2=["--binary --trace-vcd", "--runtime-debug"]) -test.execute( - # Some GCC versions hit an address-sanitizer bug otherwise) - aslr_off=True) +test.execute(aslr_off=True) # Make sure that there are no additional messages (such as runtime messages # regarding undefined behavior).test.files_identical(test.obj_dir + "/vlt_sim.log", test.golden_filename, "logfile") diff --git a/test_regress/t/t_vpi_onetime_cbs.py b/test_regress/t/t_vpi_onetime_cbs.py index 2a2646bfd..620a74cde 100755 --- a/test_regress/t/t_vpi_onetime_cbs.py +++ b/test_regress/t/t_vpi_onetime_cbs.py @@ -10,7 +10,6 @@ import vltest_bootstrap test.scenarios('simulator') -test.sanitize = False # Test neads cleanup to reclaim all callbacks test.compile(make_top_shell=False, make_main=False, diff --git a/test_regress/t/t_vthread.py b/test_regress/t/t_vthread.py index 5ee5d1e2d..670b5c0fa 100755 --- a/test_regress/t/t_vthread.py +++ b/test_regress/t/t_vthread.py @@ -11,7 +11,6 @@ import vltest_bootstrap test.scenarios('vlt') test.top_filename = test.obj_dir + "/t_vthread.v" -test.sanitize = False # GCC takes too long otherwise def gen(filename, n):