]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Hide bad act handler address warning when -q is set
authorMartin Cermak <mcermak@redhat.com>
Wed, 28 May 2025 10:09:44 +0000 (12:09 +0200)
committerMark Wielaard <mark@klomp.org>
Thu, 29 May 2025 22:02:09 +0000 (00:02 +0200)
When valgrind is run with -q, messages like "Warning: bad act
handler address 0xFFFFFFFFFFFFFFFF in rt_sigaction()" should
be hidden.

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

NEWS
coregrind/m_syswrap/syswrap-linux.c

diff --git a/NEWS b/NEWS
index 7cf33d52e5d128ea1fee5a0d6f73d28b6b6a78cc..374b14d0b1f0f51e5c320d13af8ffdcd96401dd6 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -36,6 +36,7 @@ are not entered into bugzilla tend to get forgotten about or ignored.
 504265  FreeBSD: missing syscall wrappers for fchroot and setcred
 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
 504936  Add FreeBSD amd64 sysarch subcommands AMD64_SET_TLSBASE and
         AMD64_GET_TLSBASE
 
index fa2ab9e9fe05ba6d654e05bb9b39d0a4de3b641a..0106e1661f501c46109e7c704415d1d7f8b321c9 100644 (file)
@@ -4610,14 +4610,18 @@ PRE(sys_rt_sigaction)
    if (ARG2 != 0
        && ! ML_(safe_to_deref)((void *)(Addr)ARG2,
                                sizeof(vki_sigaction_toK_t))) {
-      VG_(umsg)("Warning: bad act handler address %p in rt_sigaction()\n",
-                (void *)(Addr)ARG2);
+      if (VG_(clo_verbosity) >= 1) {
+         VG_(umsg)("Warning: bad act handler address %p in rt_sigaction()\n",
+                   (void *)(Addr)ARG2);
+      }
       SET_STATUS_Failure ( VKI_EFAULT );
    } else if ((ARG3 != 0
                && ! ML_(safe_to_deref)((void *)(Addr)ARG3,
                                        sizeof(vki_sigaction_fromK_t)))) {
-      VG_(umsg)("Warning: bad oldact handler address %p in rt_sigaction()\n",
-                (void *)(Addr)ARG3);
+      if (VG_(clo_verbosity) >= 1) {
+         VG_(umsg)("Warning: bad oldact handler address %p in rt_sigaction()\n",
+                   (void *)(Addr)ARG3);
+      }
       SET_STATUS_Failure ( VKI_EFAULT );
    } else {