]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix bug in and simply parameter access checks for pthread_sigmask.
authorJulian Seward <jseward@acm.org>
Sun, 16 Jun 2002 11:37:06 +0000 (11:37 +0000)
committerJulian Seward <jseward@acm.org>
Sun, 16 Jun 2002 11:37:06 +0000 (11:37 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@429

coregrind/vg_scheduler.c
vg_scheduler.c

index c675a83983d6a1cd82d7faba97d4f8ad9b433c90..7bc9de586ba36ba39ccec63942ba27b65bcbb6af 100644 (file)
@@ -2920,16 +2920,14 @@ void do_pthread_sigmask ( ThreadId tid,
 
    if (VG_(clo_instrument)) {
       /* check newmask/oldmask are addressible/defined */
-      if (VG_(clo_instrument)
-          && newmask
+      if (newmask
           && !VGM_(check_readable)( (Addr)newmask, 
                                     sizeof(vki_ksigset_t), NULL))
          VG_(record_pthread_err)( tid, 
             "pthread_sigmask: newmask contains "
             "unaddressible or undefined bytes");
-      if (VG_(clo_instrument)
-          && oldmask
-          && !VGM_(check_readable)( (Addr)oldmask, 
+      if (oldmask
+          && !VGM_(check_writable)( (Addr)oldmask, 
                                     sizeof(vki_ksigset_t), NULL))
          VG_(record_pthread_err)( tid, 
             "pthread_sigmask: oldmask contains "
index c675a83983d6a1cd82d7faba97d4f8ad9b433c90..7bc9de586ba36ba39ccec63942ba27b65bcbb6af 100644 (file)
@@ -2920,16 +2920,14 @@ void do_pthread_sigmask ( ThreadId tid,
 
    if (VG_(clo_instrument)) {
       /* check newmask/oldmask are addressible/defined */
-      if (VG_(clo_instrument)
-          && newmask
+      if (newmask
           && !VGM_(check_readable)( (Addr)newmask, 
                                     sizeof(vki_ksigset_t), NULL))
          VG_(record_pthread_err)( tid, 
             "pthread_sigmask: newmask contains "
             "unaddressible or undefined bytes");
-      if (VG_(clo_instrument)
-          && oldmask
-          && !VGM_(check_readable)( (Addr)oldmask, 
+      if (oldmask
+          && !VGM_(check_writable)( (Addr)oldmask, 
                                     sizeof(vki_ksigset_t), NULL))
          VG_(record_pthread_err)( tid, 
             "pthread_sigmask: oldmask contains "