Skip to content

Commit d01be3c

Browse files
authored
[sanitizer] Disable InstallAtForkHandler on Solaris, NetBSD (#75659)
Handlers need missing FutexWait implementation. Reported in #75290.
1 parent 49b0e6d commit d01be3c

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

compiler-rt/lib/asan/asan_posix.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ void PlatformTSDDtor(void *tsd) {
149149
#endif
150150

151151
void InstallAtForkHandler() {
152+
# if SANITIZER_SOLARIS || SANITIZER_NETBSD
153+
return; // FIXME: Implement FutexWait.
154+
# endif
152155
auto before = []() {
153156
if (CAN_SANITIZE_LEAKS) {
154157
__lsan::LockGlobal();

compiler-rt/lib/lsan/lsan_posix.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ void InstallAtExitCheckLeaks() {
101101
}
102102

103103
void InstallAtForkHandler() {
104+
# if SANITIZER_SOLARIS || SANITIZER_NETBSD
105+
return; // FIXME: Implement FutexWait.
106+
# endif
104107
auto before = []() {
105108
LockGlobal();
106109
LockThreads();

compiler-rt/test/sanitizer_common/TestCases/Posix/fork_threaded.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
// FIXME: False stack overflow report
1313
// UNSUPPORTED: android && asan
1414

15+
// FIXME: Requires `FutexWait` implementation. See __asan::InstallAtForkHandler.
16+
// UNSUPPORTED: target={{.*solaris.*}}
17+
// UNSUPPORTED: target={{.*netbsd.*}}
18+
1519
// Forking in multithread environment is unsupported. However we already have
1620
// some workarounds, and will add more, so this is the test.
1721
// The test try to check two things:

0 commit comments

Comments
 (0)