dos signal patch

Ove Kaaven ovek at arcticnet.no
Sat Oct 27 13:27:10 CDT 2001


Thought maybe I should start submitting some of my DOS work before someone
else starts hacking on it...

Log:
Protect against an interrupt-pending signal recursion.

Index: dlls/ntdll/signal_i386.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/signal_i386.c,v
retrieving revision 1.29
diff -u -r1.29 signal_i386.c
--- dlls/ntdll/signal_i386.c	2001/07/23 23:50:19	1.29
+++ dlls/ntdll/signal_i386.c	2001/10/27 17:00:20
@@ -787,6 +787,7 @@
 {
     EXCEPTION_RECORD rec;
     TEB *teb = NtCurrentTeb();
+    struct vm86plus_struct *vm86 = (struct vm86plus_struct*)(teb->vm86_ptr);
 
     rec.ExceptionCode           = EXCEPTION_VM86_STI;
     rec.ExceptionFlags          = EXCEPTION_CONTINUABLE;
@@ -802,6 +803,7 @@
         /* seems so, also set flag in signal context */
         if (context->EFlags & VIP_MASK) return;
         context->EFlags |= VIP_MASK;
+        vm86->regs.eflags |= VIP_MASK; /* no exception recursion */
         if (context->EFlags & VIF_MASK) {
             /* VIF is set, throw exception */
             teb->vm86_pending = 0;
@@ -809,10 +811,9 @@
             EXC_RtlRaiseException( &rec, context );
         }
     }
-    else if (teb->vm86_ptr)
+    else if (vm86)
     {
         /* not in VM86, but possibly setting up for it */
-        struct vm86plus_struct *vm86 = (struct vm86plus_struct*)(teb->vm86_ptr);
         if (vm86->regs.eflags & VIP_MASK) return;
         vm86->regs.eflags |= VIP_MASK;
         if (vm86->regs.eflags & VIF_MASK) {





More information about the wine-patches mailing list