]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Hide "Bad oldset address" warnings when -q (quiet) flag is set
authorMartin Cermak <mcermak@redhat.com>
Wed, 28 May 2025 12:50:49 +0000 (14:50 +0200)
committerMark Wielaard <mark@klomp.org>
Thu, 29 May 2025 22:09:40 +0000 (00:09 +0200)
When valgrind is run with -q, messages like "Warning: Bad oldset
address 0xFFFFFFFFFFFFFFFF in sigprocmask" be hidden.

Reproducer: TESTS=rt_sigprocmask02 make ltpchecks

https://bugs.kde.org/show_bug.cgi?id=504909

NEWS
coregrind/m_syswrap/syswrap-linux.c

diff --git a/NEWS b/NEWS
index 374b14d0b1f0f51e5c320d13af8ffdcd96401dd6..dab995c632f566356780841c2785476c87072334 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -37,6 +37,7 @@ are not entered into bugzilla tend to get forgotten about or ignored.
 504341  Valgrind killed by LTP syscall testcase setrlimit05
 504466  Double close causes SEGV
 504904  Hide "bad act handler address" warnings when -q (quiet) flag is set
+504909  Hide "Bad oldset address" warnings when -q (quiet) flag is set
 504936  Add FreeBSD amd64 sysarch subcommands AMD64_SET_TLSBASE and
         AMD64_GET_TLSBASE
 
index 0106e1661f501c46109e7c704415d1d7f8b321c9..be936ecbe18b5b9c0e82b1cf8b40d4d3c6c02e28 100644 (file)
@@ -4661,14 +4661,18 @@ PRE(sys_rt_sigprocmask)
       SET_STATUS_Failure( VKI_EINVAL );
    else if (ARG2 != 0
              && ! ML_(safe_to_deref)((void *)(Addr)ARG2, sizeof(vki_sigset_t))) {
-            VG_(dmsg)("Warning: Bad set handler address %p in sigprocmask\n",
-                      (void *)(Addr)ARG2);
+            if (VG_(clo_verbosity) >= 1) {
+               VG_(dmsg)("Warning: Bad set handler address %p in sigprocmask\n",
+                         (void *)(Addr)ARG2);
+            }
             SET_STATUS_Failure ( VKI_EFAULT );
          }
    else if (ARG3 != 0
              && ! ML_(safe_to_deref)((void *)(Addr)ARG3, sizeof(vki_sigset_t))) {
-            VG_(dmsg)("Warning: Bad oldset address %p in sigprocmask\n",
-                      (void *)(Addr)ARG3);
+            if (VG_(clo_verbosity) >= 1) {
+               VG_(dmsg)("Warning: Bad oldset address %p in sigprocmask\n",
+                         (void *)(Addr)ARG3);
+            }
             SET_STATUS_Failure ( VKI_EFAULT );
          }