[compiler-rt] [sanitizer] Don't TestPTrace() if SPARC; don't give up if internal_fork() fails (PR #152072)
Florian Mayer via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 5 10:43:50 PDT 2025
================
@@ -405,10 +405,16 @@ 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 child
-// process with a shared virtual address space and shared TLS, and therefore
+// This separate check is necessary because StopTheWorld() creates a thread
+// with a shared virtual address space and shared TLS, and therefore
// cannot use waitpid() due to the shared errno.
static void TestPTrace() {
+# if SANITIZER_SPARC
+ // internal_fork() on SPARC actually calls __fork(). We can't safely fork,
+ // because it's possible seccomp has been configured to disallow fork() but
+ // allow clone().
+ Report("WARNING: skipping TestPTrace() because this is SPARC\n");
----------------
fmayer wrote:
What are people supposed to do with this warning?
https://github.com/llvm/llvm-project/pull/152072
More information about the llvm-commits
mailing list