[compiler-rt] [sanitizer] Downgrade TestPTrace() Reports to VReport (PR #152350)
Thurston Dang via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 6 11:05:15 PDT 2025
https://github.com/thurstond created https://github.com/llvm/llvm-project/pull/152350
Requested in https://github.com/llvm/llvm-project/pull/152072#discussion_r2257892739
>From 665c22c6c657834c2a639cd65d76cf7fd83ee909 Mon Sep 17 00:00:00 2001
From: Thurston Dang <thurston at google.com>
Date: Wed, 6 Aug 2025 18:03:36 +0000
Subject: [PATCH] [sanitizer] Downgrade TestPTrace() Reports to VReport
Requested in https://github.com/llvm/llvm-project/pull/152072#discussion_r2257892739
---
.../sanitizer_stoptheworld_linux_libcdep.cpp | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
index 5fde65ea48c42..2bf547f4a7216 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
@@ -413,11 +413,12 @@ static void TestPTrace() {
// 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");
- Report(
- "If seccomp blocks ptrace, LeakSanitizer may hang without further "
- "notice\n");
- Report(
+ VReport(1, "WARNING: skipping TestPTrace() because this is SPARC\n");
+ VReport(1,
+ "If seccomp blocks ptrace, LeakSanitizer may hang without further "
+ "notice\n");
+ VReport(
+ 1,
"If seccomp does not block ptrace, you can safely ignore this warning\n");
# else
// Heuristic: only check the first time this is called. This is not always
@@ -438,7 +439,7 @@ static void TestPTrace() {
if (pid < 0) {
int rverrno;
if (internal_iserror(pid, &rverrno))
- Report("WARNING: TestPTrace() failed to fork (errno %d)\n", rverrno);
+ VReport(0, "WARNING: TestPTrace() failed to fork (errno %d)\n", rverrno);
// We don't abort the sanitizer - it's still worth letting the sanitizer
// try.
More information about the llvm-commits
mailing list