]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Reinstate a condition in the IPCOP_shmctl wrapper without which the
authorJulian Seward <jseward@acm.org>
Thu, 9 May 2002 12:01:14 +0000 (12:01 +0000)
committerJulian Seward <jseward@acm.org>
Thu, 9 May 2002 12:01:14 +0000 (12:01 +0000)
system dies to the recently-rejuvenated
first-and-last-secondaries-look-plausible assertions around syscalls.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@242

vg_syscall_mem.c

index d5d541652209cbe5d4d4967c3fb9b93d93c08a4b..bef66826bbaa3599997fe182cb9560d5a9891073 100644 (file)
@@ -1383,16 +1383,17 @@ void VG_(perform_assumed_nonblocking_syscall) ( ThreadId tid )
                 break;
             case 24: /* IPCOP_shmctl */
                if ( arg3 ) {
-                       if ( arg2 == SHM_STAT )
-                               must_be_writable( tst, "shmctl(SHM_STAT,buf)", arg3,
-                                               sizeof(struct shmid_ds) );
-                       else
-                               must_be_readable( tst, "shmctl(SHM_XXXX,buf)", arg3,
-                                               sizeof(struct shmid_ds) );
+                  if ( arg2 == SHM_STAT )
+                     must_be_writable( tst, "shmctl(SHM_STAT,buf)", arg3,
+                                       sizeof(struct shmid_ds) );
+                  else
+                     must_be_readable( tst, "shmctl(SHM_XXXX,buf)", arg3,
+                                       sizeof(struct shmid_ds) );
                }
                KERNEL_DO_SYSCALL(tid,res);
-               if ( arg3 && !VG_(is_kerror)(res) && res == 0 /*&& arg2 == SHM_STAT*/ )
-                       make_readable( arg3, sizeof(struct shmid_ds) );
+               if ( arg3 && !VG_(is_kerror)(res) 
+                    && res == 0 && arg2 == SHM_STAT )
+                  make_readable( arg3, sizeof(struct shmid_ds) );
                break;
             default:
                VG_(message)(Vg_DebugMsg,