VOID
KiEnterV86Trap(IN PKTRAP_FRAME TrapFrame)
{
- /* Save exception list */
- TrapFrame->ExceptionList = KeGetPcr()->NtTib.ExceptionList;
+ PVOID ExceptionList;
+
+ /* Check exception list */
+ ExceptionList = KeGetPcr()->NtTib.ExceptionList;
+ ASSERTMSG("V86 trap handler must not register an SEH frame\n",
+ ExceptionList == TrapFrame->ExceptionList);
/* Save DR7 and check for debugging */
TrapFrame->Dr7 = __readdr(7);
VOID
KiEnterInterruptTrap(IN PKTRAP_FRAME TrapFrame)
{
- /* Save exception list and terminate it */
- TrapFrame->ExceptionList = KeGetPcr()->NtTib.ExceptionList;
+ PVOID ExceptionList;
+
+ /* Check exception list and terminate it */
+ ExceptionList = KeGetPcr()->NtTib.ExceptionList;
+ ASSERTMSG("Interrupt handler must not register an SEH frame\n",
+ ExceptionList == TrapFrame->ExceptionList);
KeGetPcr()->NtTib.ExceptionList = EXCEPTION_CHAIN_END;
/* Default to debugging disabled */
VOID
KiEnterTrap(IN PKTRAP_FRAME TrapFrame)
{
- /* Save exception list */
- TrapFrame->ExceptionList = KeGetPcr()->NtTib.ExceptionList;
+ PVOID ExceptionList;
+
+ /* Check exception list */
+ ExceptionList = KeGetPcr()->NtTib.ExceptionList;
+ ASSERTMSG("Trap handler must not register an SEH frame\n",
+ ExceptionList == TrapFrame->ExceptionList);
/* Default to debugging disabled */
TrapFrame->Dr7 = 0;