From: Mark W. <ma...@so...> - 2025-05-29 22:15:36
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=4540c465868f18943e649c686e83e33688711887 commit 4540c465868f18943e649c686e83e33688711887 Author: Martin Cermak <mc...@re...> Date: Wed May 28 14:50:49 2025 +0200 Hide "Bad oldset address" warnings when -q (quiet) flag is set 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 Diff: --- NEWS | 1 + coregrind/m_syswrap/syswrap-linux.c | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 374b14d0b1..dab995c632 100644 --- 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 diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index 0106e1661f..be936ecbe1 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -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 ); } |