From: Julian Seward Date: Thu, 9 May 2002 12:01:14 +0000 (+0000) Subject: Reinstate a condition in the IPCOP_shmctl wrapper without which the X-Git-Tag: svn/VALGRIND_1_0_3~222 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc18649d8ae614d707d07e99f645c3c8bc107cf3;p=thirdparty%2Fvalgrind.git Reinstate a condition in the IPCOP_shmctl wrapper without which the 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 --- diff --git a/vg_syscall_mem.c b/vg_syscall_mem.c index d5d5416522..bef66826bb 100644 --- a/vg_syscall_mem.c +++ b/vg_syscall_mem.c @@ -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,