[all-commits] [llvm/llvm-project] 8d0155: [tsan] Fix build for FreeBSD and NetBSD after 0784...
Dimitry Andric via All-commits
all-commits at lists.llvm.org
Mon Jan 22 09:35:47 PST 2024
Branch: refs/heads/users/DimitryAndric/tsan-fix-freebsd
Home: https://github.com/llvm/llvm-project
Commit: 8d0155257cd40c57f0a475cfe06efc1eb544ce9e
https://github.com/llvm/llvm-project/commit/8d0155257cd40c57f0a475cfe06efc1eb544ce9e
Author: Dimitry Andric <dimitry at andric.com>
Date: 2024-01-22 (Mon, 22 Jan 2024)
Changed paths:
M compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp
Log Message:
-----------
[tsan] Fix build for FreeBSD and NetBSD after 0784b1eefa36
In 0784b1eefa36 some code for re-execution was moved to
`ReExecIfNeeded()`, but also extended with a few Linux-only features.
This leads to compile errors on FreeBSD, or other non-Linux platforms:
compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp:247:25: error: use of undeclared identifier 'personality'
247 | int old_personality = personality(0xffffffff);
| ^
compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp:249:54: error: use of undeclared identifier 'ADDR_NO_RANDOMIZE'
249 | (old_personality != -1) && ((old_personality & ADDR_NO_RANDOMIZE) == 0);
| ^
compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp:281:46: error: use of undeclared identifier 'ADDR_NO_RANDOMIZE'
281 | CHECK_NE(personality(old_personality | ADDR_NO_RANDOMIZE), -1);
| ^
Surround the affected part with a `#if SANITIZER_LINUX` block for now.
More information about the All-commits
mailing list