GH-111807: Lower the parser stack depth under WASI debug builds (#112225)

This commit is contained in:
Brett Cannon 2023-11-20 05:27:33 -08:00 committed by GitHub
parent ce1096f974
commit 56e59a49ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 2 deletions

View File

@ -0,0 +1 @@
Lower the max parser stack depth to 1000 under WASI debug builds.

6
Parser/parser.c generated
View File

@ -8,7 +8,11 @@
#endif
#ifdef __wasi__
# define MAXSTACK 4000
# ifdef Py_DEBUG
# define MAXSTACK 1000
# else
# define MAXSTACK 4000
# endif
#else
# define MAXSTACK 6000
#endif

View File

@ -38,7 +38,11 @@ EXTENSION_PREFIX = """\
#endif
#ifdef __wasi__
# define MAXSTACK 4000
# ifdef Py_DEBUG
# define MAXSTACK 1000
# else
# define MAXSTACK 4000
# endif
#else
# define MAXSTACK 6000
#endif