]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Hide "client tried to modify addresses" warnings when -q (quiet) is set
authorMartin Cermak <mcermak@redhat.com>
Wed, 28 May 2025 16:04:46 +0000 (18:04 +0200)
committerMark Wielaard <mark@klomp.org>
Thu, 29 May 2025 22:25:06 +0000 (00:25 +0200)
When -q is set, that is when verbosity is 0, the "client tried to
modify addresses" warning should be hidden.

Also remove the warning from {freebsd,solaris}/scalar.stderr.exp

Reproducer: TESTS=munmap03 make -j$(nproc) ltpchecks

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

NEWS
coregrind/m_syswrap/syswrap-generic.c
memcheck/tests/freebsd/scalar.stderr.exp
memcheck/tests/freebsd/scalar.stderr.exp-x86
memcheck/tests/solaris/scalar.stderr.exp

diff --git a/NEWS b/NEWS
index dab995c632f566356780841c2785476c87072334..041d7afdf376b973fa60c360c790ee5321afc8b3 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -38,6 +38,7 @@ are not entered into bugzilla tend to get forgotten about or ignored.
 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
+504919  Hide "client tried to modify addresses" warnings when -q (quiet) set
 504936  Add FreeBSD amd64 sysarch subcommands AMD64_SET_TLSBASE and
         AMD64_GET_TLSBASE
 
index 98cbb172fdd249c85e60b616532a23a2da5dacb8..f8d73e1973d35d2df64d09f072da2c9eeac6fbae 100644 (file)
@@ -121,9 +121,11 @@ Bool ML_(valid_client_addr)(Addr start, SizeT size, ThreadId tid,
                  syscallname, start, start+size-1, (Int)ret);
 
    if (!ret && syscallname != NULL) {
-      VG_(message)(Vg_UserMsg, "Warning: client syscall %s tried "
-                               "to modify addresses %#lx-%#lx\n",
-                               syscallname, start, start+size-1);
+      if (VG_(clo_verbosity) >= 1) {
+         VG_(message)(Vg_UserMsg, "Warning: client syscall %s tried "
+                                  "to modify addresses %#lx-%#lx\n",
+                                  syscallname, start, start+size-1);
+      }
       if (VG_(clo_verbosity) > 1) {
          VG_(get_and_pp_StackTrace)(tid, VG_(clo_backtrace_size));
       }
index 59ed18524266ec4f87e91d76258c94cad44fdc7d..24b7ba2bbdca74b677ad02852d2c5db17b6ba1fe 100644 (file)
@@ -610,7 +610,6 @@ Syscall param mprotect(len) contains uninitialised byte(s)
 Syscall param mprotect(prot) contains uninitialised byte(s)
    ...
 
-Warning: client syscall mprotect tried to modify addresses 0x........-0x........
 ---------------------------------------------------------
  75:             SYS_madvise 3s 0m
 ---------------------------------------------------------
index 091a1770d6cc155939510ebaffc2df6c7d113301..788dfbd7c0ac9a95aa756964615a5a23b836eea7 100644 (file)
@@ -610,7 +610,6 @@ Syscall param mprotect(len) contains uninitialised byte(s)
 Syscall param mprotect(prot) contains uninitialised byte(s)
    ...
 
-Warning: client syscall mprotect tried to modify addresses 0x........-0x........
 ---------------------------------------------------------
  75:             SYS_madvise 3s 0m
 ---------------------------------------------------------
index d80bc27d076a8357fad2522c013913c8e80de1d2..e7951dae7763ebe603df8e504a7c19f2bb10ae21 100644 (file)
@@ -618,7 +618,6 @@ Syscall param shmsys_shmdt(opcode) contains uninitialised byte(s)
 Syscall param shmsys_shmdt(shmaddr) contains uninitialised byte(s)
    ...
 
-Warning: client syscall shmdt tried to modify addresses 0x........-0x........
 ---------------------------------------------------------
  52:              SYS_shmsys (SHMGET) 4s 0m
 ---------------------------------------------------------