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

Thurston Dang via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 4 12:59:18 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.
----------------
thurstond wrote:

Thanks, updated.

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


More information about the llvm-commits mailing list