]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
FreeBSD sigprocmask syscall: do not print warnings when -q is set
authorPaul Floyd <pjfloyd@wanadoo.fr>
Fri, 30 May 2025 06:31:48 +0000 (08:31 +0200)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Fri, 30 May 2025 06:31:48 +0000 (08:31 +0200)
Equivalent to bug504904 and bug504909

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

index 8fcfe10904183bc07a556e5218a4e4f08ab7f43f..41b0cc38b2b61a895c552256f0d07478c73dd08a 100644 (file)
@@ -3197,13 +3197,17 @@ PRE(sys_sigprocmask)
 
    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",
+      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 );
    } else {
       SET_STATUS_from_SysRes(VG_(do_sys_sigprocmask)(tid, ARG1 /*how*/,
@@ -3922,14 +3926,18 @@ PRE(sys_sigaction)
    if (ARG2 != 0
          && ! ML_(safe_to_deref)((void *)(Addr)ARG2,
                                  sizeof(struct vki_sigaction))) {
-      VG_(umsg)("Warning: bad act handler address %p in sigaction()\n",
-                (void *)(Addr)ARG2);
+      if (VG_(clo_verbosity) >= 1) {
+         VG_(umsg)("Warning: bad act handler address %p in sigaction()\n",
+                   (void *)(Addr)ARG2);
+      }
       SET_STATUS_Failure ( VKI_EFAULT );
    } else if ((ARG3 != 0
                && ! ML_(safe_to_deref)((void *)(Addr)ARG3,
                                        sizeof(struct vki_sigaction)))) {
-      VG_(umsg)("Warning: bad oact handler address %p in sigaction()\n",
-                (void *)(Addr)ARG3);
+      if (VG_(clo_verbosity) >= 1) {
+         VG_(umsg)("Warning: bad oact handler address %p in sigaction()\n",
+                   (void *)(Addr)ARG3);
+      }
       SET_STATUS_Failure ( VKI_EFAULT );
    } else {
       if (ARG2 != 0) {
index 24b7ba2bbdca74b677ad02852d2c5db17b6ba1fe..d632beea425d92ad0240b58fda1f569a5ddaf68b 100644 (file)
@@ -2429,7 +2429,6 @@ Syscall param sigprocmask(oset) points to unaddressable byte(s)
    ...
  Address 0x........ is not stack'd, malloc'd or (recently) free'd
 
-Warning: Bad oldset address 0x........ in sigprocmask
 ---------------------------------------------------------
 340:         SYS_sigprocmask 3s 2m
 ---------------------------------------------------------
@@ -2450,7 +2449,6 @@ Syscall param sigprocmask(oset) points to unaddressable byte(s)
    ...
  Address 0x........ is not stack'd, malloc'd or (recently) free'd
 
-Warning: Bad set handler address 0x........ in sigprocmask
 ---------------------------------------------------------
 341:          SYS_sigsuspend 1s 1m
 ---------------------------------------------------------
@@ -3227,7 +3225,6 @@ Syscall param sigaction(oact) points to unaddressable byte(s)
    ...
  Address 0x........ is not stack'd, malloc'd or (recently) free'd
 
-Warning: bad act handler address 0x........ in sigaction()
 ---------------------------------------------------------
 417:           SYS_sigreturn 1s 1m
 ---------------------------------------------------------
index 788dfbd7c0ac9a95aa756964615a5a23b836eea7..7a9af94e8aa3c27c080a978039543cc9df9df062 100644 (file)
@@ -2435,7 +2435,6 @@ Syscall param sigprocmask(oset) points to unaddressable byte(s)
    ...
  Address 0x........ is not stack'd, malloc'd or (recently) free'd
 
-Warning: Bad oldset address 0x........ in sigprocmask
 ---------------------------------------------------------
 340:         SYS_sigprocmask 3s 2m
 ---------------------------------------------------------
@@ -2456,7 +2455,6 @@ Syscall param sigprocmask(oset) points to unaddressable byte(s)
    ...
  Address 0x........ is not stack'd, malloc'd or (recently) free'd
 
-Warning: Bad set handler address 0x........ in sigprocmask
 ---------------------------------------------------------
 341:          SYS_sigsuspend 1s 1m
 ---------------------------------------------------------
@@ -3236,7 +3234,6 @@ Syscall param sigaction(oact) points to unaddressable byte(s)
    ...
  Address 0x........ is not stack'd, malloc'd or (recently) free'd
 
-Warning: bad act handler address 0x........ in sigaction()
 ---------------------------------------------------------
 417:           SYS_sigreturn 1s 1m
 ---------------------------------------------------------