You CANNOT return from PSEH! You must use SEH_LEAVE or the newest SHE construct that KJK
added (forgot what he called it, check commit logs).
-----Original Message-----
From: ros-diffs-bounces(a)reactos.org [mailto:ros-diffs-bounces@reactos.org] On Behalf Of
dgorbachev(a)svn.reactos.org
Sent: May-01-07 4:53 AM
To: ros-diffs(a)reactos.org
Subject: [ros-diffs] [dgorbachev] 26608: - Fix infinite loop. - Add debug msg.
Author: dgorbachev
Date: Tue May  1 12:52:59 2007
New Revision: 26608
URL: 
http://svn.reactos.org/svn/reactos?rev=26608&view=rev
Log:
- Fix infinite loop.
- Add debug msg.
Modified:
    trunk/reactos/ntoskrnl/ke/i386/exp.c
Modified: trunk/reactos/ntoskrnl/ke/i386/exp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/exp.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/exp.c (original)
+++ trunk/reactos/ntoskrnl/ke/i386/exp.c Tue May  1 12:52:59 2007
@@ -980,7 +980,9 @@
                 /* Set EIP to the User-mode Dispatcher */
                 TrapFrame->Eip = (ULONG)KeUserExceptionDispatcher;
-                _SEH_LEAVE;
+
+                /* Dispatch exception to user-mode */
+                return;
             }
             _SEH_EXCEPT(KiCopyInformation)
             {
@@ -1000,9 +1002,6 @@
                 }
             }
             _SEH_END;
-
-            /* Dispatch exception to user-mode */
-            return;
         }
         /* Try second chance */
@@ -1018,6 +1017,7 @@
         }
         /* 3rd strike, kill the process */
+        DPRINT1("Kill the process\n");
         ZwTerminateProcess(NtCurrentProcess(), ExceptionRecord->ExceptionCode);
         KeBugCheckEx(KMODE_EXCEPTION_NOT_HANDLED,
                      ExceptionRecord->ExceptionCode,