reduce marshal stack size in debug mode on windows (closes #27019)
diff --git a/Python/marshal.c b/Python/marshal.c
index 6b285aa..e1a84d0 100644
--- a/Python/marshal.c
+++ b/Python/marshal.c
@@ -16,8 +16,13 @@
 /* High water mark to determine when the marshalled object is dangerously deep
  * and risks coring the interpreter.  When the object stack gets this deep,
  * raise an exception instead of continuing.
+ * On Windows debug builds, reduce this value.
  */
+#if defined(MS_WINDOWS) && defined(_DEBUG)
+#define MAX_MARSHAL_STACK_DEPTH 1000
+#else
 #define MAX_MARSHAL_STACK_DEPTH 2000
+#endif
 
 #define TYPE_NULL               '0'
 #define TYPE_NONE               'N'