From bbb1fad521ca03707661982dc8d900fde62af510 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sat, 14 Aug 2004 12:10:49 +0000 Subject: [PATCH] Rather surprisingly we weren't actually calling pre_mem_write for the buffer argument to the read system call... git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2583 --- coregrind/vg_syscalls.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/coregrind/vg_syscalls.c b/coregrind/vg_syscalls.c index 2e30e6877c..687c10b8f4 100644 --- a/coregrind/vg_syscalls.c +++ b/coregrind/vg_syscalls.c @@ -4182,13 +4182,14 @@ PRE(read) MAYBE_PRINTF("read ( %d, %p, %d )\n", arg1, arg2, arg3); if (!fd_allowed(arg1, "read", tid, False)) - res = -VKI_EBADF; + res = -VKI_EBADF; + else + SYSCALL_TRACK( pre_mem_write, tid, "read(buf)", arg2, arg3 ); } POST(read) { - if (res > 0) - VG_TRACK(post_mem_write, arg2, res); + VG_TRACK( post_mem_write, arg2, res ); } PRE(write) -- 2.47.2