From: Martin Cermak Date: Wed, 28 May 2025 10:09:44 +0000 (+0200) Subject: Hide bad act handler address warning when -q is set X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ad6ca3e69358e440b4841cecf0ebed5aa7351d69;p=thirdparty%2Fvalgrind.git Hide bad act handler address warning when -q is set 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 --- diff --git a/NEWS b/NEWS index 7cf33d52e..374b14d0b 100644 --- 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 diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index fa2ab9e9f..0106e1661 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -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 {