summaryrefslogtreecommitdiffstats
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2014-11-22 04:33:12 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2014-11-22 04:33:12 (GMT)
commit9b59dd4781c1fdcf79060f62e0e2f10f67a06c65 (patch)
treea2be8bae52ac74c4bac3193b38332399e0281a8d /Python/pythonrun.c
parentfc9fdedd09c42a3f49b0ea8f6b22d3f2872af186 (diff)
downloadcpython-9b59dd4781c1fdcf79060f62e0e2f10f67a06c65.zip
cpython-9b59dd4781c1fdcf79060f62e0e2f10f67a06c65.tar.gz
cpython-9b59dd4781c1fdcf79060f62e0e2f10f67a06c65.tar.bz2
Issue #22869: Remove duplicate stack check from pythonrun.c
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 992a5a3..d435ef4 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -1376,43 +1376,6 @@ cleanup:
}
-#if defined(USE_STACKCHECK)
-#if defined(WIN32) && defined(_MSC_VER)
-
-/* Stack checking for Microsoft C */
-
-#include <malloc.h>
-#include <excpt.h>
-
-/*
- * Return non-zero when we run out of memory on the stack; zero otherwise.
- */
-int
-PyOS_CheckStack(void)
-{
- __try {
- /* alloca throws a stack overflow exception if there's
- not enough space left on the stack */
- alloca(PYOS_STACK_MARGIN * sizeof(void*));
- return 0;
- } __except (GetExceptionCode() == STATUS_STACK_OVERFLOW ?
- EXCEPTION_EXECUTE_HANDLER :
- EXCEPTION_CONTINUE_SEARCH) {
- int errcode = _resetstkoflw();
- if (errcode == 0)
- {
- Py_FatalError("Could not reset the stack!");
- }
- }
- return 1;
-}
-
-#endif /* WIN32 && _MSC_VER */
-
-/* Alternate implementations can be added here... */
-
-#endif /* USE_STACKCHECK */
-
/* Deprecated C API functions still provided for binary compatiblity */
#undef PyParser_SimpleParseFile