[compiler-rt] [sanitizer] Print diagnostic if ptrace syscall fails (PR #151406)

Florian Mayer via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 4 12:34:11 PDT 2025


================
@@ -403,7 +403,48 @@ struct ScopedSetTracerPID {
   }
 };
 
+// This detects whether ptrace is blocked (e.g., by seccomp), by forking and
+// then attempting ptrace.
+// This separate check is necessary because StopTheWorld() creates a *thread*,
+// and therefore cannot use waitpid() due to the shared errno.
----------------
fmayer wrote:

This whole code is under `SANITIZER_LINUX` though

https://github.com/llvm/llvm-project/pull/151406


More information about the llvm-commits mailing list