From: Nicholas Nethercote Date: Thu, 26 Jun 2003 14:57:01 +0000 (+0000) Subject: comment only X-Git-Tag: svn/VALGRIND_2_0_0~76 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c10bae9afe3475912b5fa65fbb96ecb2c6beb69d;p=thirdparty%2Fvalgrind.git comment only git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1708 --- diff --git a/coregrind/vg_syscalls.c b/coregrind/vg_syscalls.c index 59092a74b0..b79ada6d24 100644 --- a/coregrind/vg_syscalls.c +++ b/coregrind/vg_syscalls.c @@ -2704,7 +2704,20 @@ void VG_(perform_assumed_nonblocking_syscall) ( ThreadId tid ) } /* For some unknown reason, %ebx sometimes gets changed by poll... let the skin know (using the `post_reg_write_syscall_return' - event isn't ideal... */ + event isn't ideal... + + Update from Lennert Buytenhek : + This came up a while ago on linux-kernel, search for a posting + by dvorak . + + Basically, the linux syscall handler pushes the arguments to the + stack, and inside sys_poll (or another routine), one of the + parameters to the function is changed. gcc uses the stack space + the parameter came in as the storage location for that variable, + and will sometimes spill that variable back to stack. The linux + syscall handler pops all registers on return, and that is how + %ebx can get changed sometimes. + */ if (arg1 != tst->m_ebx) { VG_TRACK( post_reg_write_syscall_return, tid, R_EBX ); }