Kaydet (Commit) 5299935b authored tarafından Kristján Valur Jónsson's avatar Kristján Valur Jónsson

Perform correct handling of stack overflow for windows: Catch the correct…

Perform correct handling of stack overflow for windows: Catch the correct exception code and reset the overflow condition when handled.
üst d50a5f28
......@@ -1701,8 +1701,14 @@ PyOS_CheckStack(void)
not enough space left on the stack */
alloca(PYOS_STACK_MARGIN * sizeof(void*));
return 0;
} __except (EXCEPTION_EXECUTE_HANDLER) {
/* just ignore all errors */
} __except (GetExceptionCode() == STATUS_STACK_OVERFLOW ?
EXCEPTION_EXECUTE_HANDLER :
EXCEPTION_CONTINUE_SEARCH) {
int errcode = _resetstkoflw();
if (errcode)
{
Py_FatalError("Could not reset the stack!");
}
}
return 1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment