Event bug, fix

From: Ronald Oussoren <roussor_at_nospam.org>
Date: Wed Apr 19 1995 - 01:20:03 PDT

Hi,

Earlier I sent a message about a bug in the (i386) implementation of the
event mechanism. Basically the assembly part of the handler returned to
a random address. The following patch fixes that. However it is not perfect:
The return address is just outside off the stack (it will be changed when
something is pushed on the stack), thus when a second event is send just
before the first handler returns, the return address will be invalid.

        Ronald

*** syscalls.s Wed Apr 19 09:52:26 1995
--- ../../new/syscalls.s Wed Apr 19 09:51:24 1995
***************
*** 94,100 ****
          popf /* Restore state */
          popa
          pop %esp /* Skip event string */
! ret /* Resume at old IP */
  
          .globl _notify_handler
  _notify_handler:
--- 94,100 ----
          popf /* Restore state */
          popa
          pop %esp /* Skip event string */
! jmp -4(%esp) /* Resume at old IP */
  
          .globl _notify_handler
  _notify_handler:
Received on Wed Apr 19 06:56:17 1995

This archive was generated by hypermail 2.1.8 : Thu Sep 22 2005 - 15:12:27 PDT