[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 13:25:04 PDT 2025


================
@@ -405,17 +405,20 @@ 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.
+// This separate check is necessary because StopTheWorld() creates a child
+// process with a shared virtual address space, and therefore cannot use
----------------
fmayer wrote:

I don't think this is true though. Thread locals should be relative to the thread pointer, which should be different. That wasn't a statement on my part, but a question (you can do all sorts of messed up stuff with clone flags)

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


More information about the llvm-commits mailing list