Skip to content

Commit

Permalink
pythonGH-111807: Lower the parser stack depth under WASI debug builds (
Browse files Browse the repository at this point in the history
  • Loading branch information
brettcannon authored Nov 20, 2023
1 parent ce1096f commit 56e59a4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Lower the max parser stack depth to 1000 under WASI debug builds.
6 changes: 5 additions & 1 deletion Parser/parser.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion Tools/peg_generator/pegen/c_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@
#endif
#ifdef __wasi__
# define MAXSTACK 4000
# ifdef Py_DEBUG
# define MAXSTACK 1000
# else
# define MAXSTACK 4000
# endif
#else
# define MAXSTACK 6000
#endif
Expand Down

0 comments on commit 56e59a4

Please sign in to comment.