[all-commits] [llvm/llvm-project] 94ea36: tsan: fix trace tests on darwin
Dmitry Vyukov via All-commits
all-commits at lists.llvm.org
Mon Sep 27 07:41:09 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 94ea36649ecc854d290c6797e6adb91bdfac756d
https://github.com/llvm/llvm-project/commit/94ea36649ecc854d290c6797e6adb91bdfac756d
Author: Dmitry Vyukov <dvyukov at google.com>
Date: 2021-09-27 (Mon, 27 Sep 2021)
Changed paths:
M compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp
M compiler-rt/lib/tsan/tests/unit/tsan_trace_test.cpp
Log Message:
-----------
tsan: fix trace tests on darwin
The trace tests crashed on darwin because of some thread
initialization issues (thread initialization is somewhat
different on darwin).
Instead of starting real threads, create a new ThreadState
in the main thread. This makes the tests more unit-testy
and hopefully won't crash on darwin (there is almost no
platform-specific code involved now).
This will also help with future trace tests that will need
more than 1 thread. Creating more than 1 real thread and
dispatching test actions across multiple threads in the
required deterministic order is painful.
Depends on D110539.
Reviewed By: melver
Differential Revision: https://reviews.llvm.org/D110546
More information about the All-commits
mailing list