mirror of
https://github.com/reactos/reactos.git
synced 2024-07-12 15:45:20 +00:00
[FAST486]
Fix a BOP-related stack corruption. CORE-8199 #resolve #comment Fixed in revision r63286. svn path=/trunk/; revision=63286
This commit is contained in:
parent
32604108f4
commit
b748bf5dc8
|
@ -159,7 +159,8 @@ typedef enum _FAST486_INT_STATUS
|
|||
{
|
||||
FAST486_INT_NONE = 0,
|
||||
FAST486_INT_EXECUTE = 1,
|
||||
FAST486_INT_SIGNAL = 2
|
||||
FAST486_INT_SIGNAL = 2,
|
||||
FAST486_INT_DELAYED = 3
|
||||
} FAST486_INT_STATUS, *PFAST486_INT_STATUS;
|
||||
|
||||
typedef
|
||||
|
|
|
@ -121,6 +121,11 @@ Fast486ExecutionControl(PFAST486_STATE State, FAST486_EXEC_CMD Command)
|
|||
/* Set the interrupt status to execute on the next instruction */
|
||||
State->IntStatus = FAST486_INT_EXECUTE;
|
||||
}
|
||||
else if (State->IntStatus == FAST486_INT_DELAYED)
|
||||
{
|
||||
/* Restore the old state */
|
||||
State->IntStatus = FAST486_INT_EXECUTE;
|
||||
}
|
||||
}
|
||||
while ((Command == FAST486_CONTINUE)
|
||||
|| (Command == FAST486_STEP_OVER && ProcedureCallCount > 0)
|
||||
|
|
|
@ -4397,6 +4397,17 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeLdsLes)
|
|||
/* Call the BOP handler */
|
||||
State->BopCallback(State, BopCode);
|
||||
|
||||
/*
|
||||
* If an interrupt should occur at this time, delay it.
|
||||
* We must do this because if an interrupt begins and the BOP callback
|
||||
* changes the CS:IP, the interrupt handler won't execute and the
|
||||
* stack pointer will never be restored.
|
||||
*/
|
||||
if (State->IntStatus == FAST486_INT_EXECUTE)
|
||||
{
|
||||
State->IntStatus = FAST486_INT_DELAYED;
|
||||
}
|
||||
|
||||
/* Return success */
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue