From: Tom Hughes Date: Sat, 14 Aug 2004 12:10:49 +0000 (+0000) Subject: Rather surprisingly we weren't actually calling pre_mem_write for the buffer X-Git-Tag: svn/VALGRIND_2_2_0~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bbb1fad521ca03707661982dc8d900fde62af510;p=thirdparty%2Fvalgrind.git 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 --- 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)