verilator/docs/guide
Geza Lore 52287c025f
Tests: Add TSan and failing multi-threaded data race test (#7913)
PR #7902 uncovered a pre-existing bug in multi-threaded scheduling,
where we can end up with an un-ordered R-W hazard in the MTask graph,
resulting in non-deterministic runtime behaviour.

This is extremely hard to actually trigger on a small example, so using
ThreadSanitizer to flag it, which can identify the race reliably.

In this patch:
- Add configure and `verilator --get-supported TSAN` to check if the
  configured compiler supports ThreadSanitizer
- Add a --tsan option to the test driver.py which builds the test with
  thread sanitizer (similar idea to --gdbsim).
- Add a tests.enable_tsan() method to allow turning on TSan in the test
  Python file.
- Add a suppressions file that waives TSan errors in the runtime library
- Finally add `t_sched_hybrid_hazard` that demonstrates the data race
  triggered after #7902. This is currently expected failing, fix later.

With the suppression, there are 17 vltmt tests failing due races in the
generated code. (Using `driver.py --vltmt --tsan --quiet -j0`)
2026-07-10 14:34:51 +01:00
..
figures Verilator_gantt now shows the predicted mtask times, eval times, and additional statistics. 2021-09-23 22:59:36 -04:00
changes.rst Commentary: Use standard multiline rst comments, other cleanups 2026-06-18 21:58:01 -04:00
conf.py Commentary: Changes update 2026-04-23 00:44:50 -04:00
connecting.rst Commentary (#7916) 2026-07-10 08:38:01 -04:00
contributing.rst Commentary: Make RST documents round-trip clean. No output change intended. 2026-06-21 10:15:47 -04:00
contributors.rst Commentary: Make RST documents round-trip clean. No output change intended. 2026-06-21 10:15:47 -04:00
control.rst Commentary: Use standard multiline rst comments, other cleanups 2026-06-18 21:58:01 -04:00
copyright.rst Commentary: Use standard multiline rst comments, other cleanups 2026-06-18 21:58:01 -04:00
deprecations.rst Commentary: Use standard multiline rst comments, other cleanups 2026-06-18 21:58:01 -04:00
environment.rst Commentary: Use standard multiline rst comments, other cleanups 2026-06-18 21:58:01 -04:00
example_binary.rst Commentary: Use standard multiline rst comments, other cleanups 2026-06-18 21:58:01 -04:00
example_cc.rst Commentary: Use standard multiline rst comments, other cleanups 2026-06-18 21:58:01 -04:00
example_common_install.rst Commentary: Use standard multiline rst comments, other cleanups 2026-06-18 21:58:01 -04:00
example_dist.rst Commentary: Use standard multiline rst comments, other cleanups 2026-06-18 21:58:01 -04:00
example_sc.rst Commentary: Use standard multiline rst comments, other cleanups 2026-06-18 21:58:01 -04:00
examples.rst Commentary: Make RST documents round-trip clean. No output change intended. 2026-06-21 10:15:47 -04:00
exe_sim.rst Support dynamic loading of VPI extensions (#7727) 2026-06-28 09:28:09 -04:00
exe_verilator.rst Tests: Add TSan and failing multi-threaded data race test (#7913) 2026-07-10 14:34:51 +01:00
exe_verilator_coverage.rst Commentary: Use standard multiline rst comments, other cleanups 2026-06-18 21:58:01 -04:00
exe_verilator_gantt.rst Commentary: Use standard multiline rst comments, other cleanups 2026-06-18 21:58:01 -04:00
exe_verilator_profcfunc.rst Commentary: Use standard multiline rst comments, other cleanups 2026-06-18 21:58:01 -04:00
executables.rst Commentary: Use standard multiline rst comments, other cleanups 2026-06-18 21:58:01 -04:00
extensions.rst Support user-provided DPI-C function declarations (#7626) (#7893) 2026-07-08 05:22:24 -07:00
faq.rst Commentary: Make RST documents round-trip clean. No output change intended. 2026-06-21 10:15:47 -04:00
files.rst Commentary: Make RST documents round-trip clean. No output change intended. 2026-06-21 10:15:47 -04:00
index.rst Commentary: Use standard multiline rst comments, other cleanups 2026-06-18 21:58:01 -04:00
install-cmake.rst Commentary: Make RST documents round-trip clean. No output change intended. 2026-06-21 10:15:47 -04:00
install.rst Commentary: Make RST documents round-trip clean. No output change intended. 2026-06-21 10:15:47 -04:00
languages.rst Commentary: Make RST documents round-trip clean. No output change intended. 2026-06-21 10:15:47 -04:00
overview.rst Commentary: Make RST documents round-trip clean. No output change intended. 2026-06-21 10:15:47 -04:00
simulating.rst Commentary: Make RST documents round-trip clean. No output change intended. 2026-06-21 10:15:47 -04:00
verilating.rst Commentary: Make RST documents round-trip clean. No output change intended. 2026-06-21 10:15:47 -04:00
warnings.rst Support NBAs in initial blocks (#7754) 2026-06-20 17:23:05 -04:00