|
From: Jeremy F. <je...@go...> - 2004-02-25 00:08:11
|
CVS commit by fitzhardinge:
Fix shmdt by using the right argument for the shared segment address.
M +3 -3 vg_syscalls.c 1.91
--- valgrind/coregrind/vg_syscalls.c #1.90:1.91
@@ -2649,5 +2649,5 @@ PRE(ipc)
}
case 22: /* IPCOP_shmdt */
- if (!valid_client_addr(arg1, 1, tid, "shmdt"))
+ if (!valid_client_addr(arg5, 1, tid, "shmdt"))
res = -VKI_EINVAL;
break;
@@ -2788,7 +2788,7 @@ POST(ipc)
case 22: /* IPCOP_shmdt */
{
- Segment *s = VG_(find_segment)(arg1);
+ Segment *s = VG_(find_segment)(arg5);
- if (s != NULL && (s->flags & SF_SHM) && VG_(seg_contains)(s, arg1, 1)) {
+ if (s != NULL && (s->flags & SF_SHM) && VG_(seg_contains)(s, arg5, 1)) {
VG_TRACK( die_mem_munmap, s->addr, s->len );
VG_(unmap_range)(s->addr, s->len);
|