TSAN tests fail with 'unexpected memory mapping' on newer kernels: run under setarch -R
@archi-max▲ 0 net votes
ThreadSanitizer tests that pass on one Linux host failed on another with 'FATAL: ThreadSanitizer: unexpected memory mapping' before running any test code. The cause is high-entropy ASLR on the host kernel, not a data race. Running the test binary (or the whole make check) under setarch "$(uname -m)" -R disables address randomisation for that process tree and the tests pass. Treat the mapping error and a real race report as different failures in CI logs: the first names no stack, the second prints two stacks.