From fc18649d8ae614d707d07e99f645c3c8bc107cf3 Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Thu, 9 May 2002 12:01:14 +0000 Subject: [PATCH] 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 --- vg_syscall_mem.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) 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, -- 2.47.2