diff --git a/compiler-rt/lib/asan/asan_posix.cpp b/compiler-rt/lib/asan/asan_posix.cpp index 76564538bd5d77..c42c0472592b78 100644 --- a/compiler-rt/lib/asan/asan_posix.cpp +++ b/compiler-rt/lib/asan/asan_posix.cpp @@ -171,7 +171,11 @@ static void AfterFork(bool fork_child) { } void InstallAtForkHandler() { -# if SANITIZER_SOLARIS || SANITIZER_NETBSD || SANITIZER_APPLE +# if SANITIZER_SOLARIS || SANITIZER_NETBSD || SANITIZER_APPLE || \ + (SANITIZER_LINUX && SANITIZER_SPARC) + // While other Linux targets use clone in internal_fork which doesn't + // trigger pthread_atfork handlers, Linux/sparc64 uses __fork, causing a + // hang. return; // FIXME: Implement FutexWait. # endif pthread_atfork(