]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
comment only
authorNicholas Nethercote <njn@valgrind.org>
Thu, 26 Jun 2003 14:57:01 +0000 (14:57 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Thu, 26 Jun 2003 14:57:01 +0000 (14:57 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1708

coregrind/vg_syscalls.c

index 59092a74b0ea72cbb1865632a87ef35efdf505e7..b79ada6d24cc668c31012d2dec439806df7f5aea 100644 (file)
@@ -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 <buytenh@gnu.org>: 
+            This came up a while ago on linux-kernel, search for a posting
+            by dvorak <dvorak@xs4all.nl>.
+
+            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 );
          }