Skip to content

Commit

Permalink
[ruby/prism] Increase value of PRISM_DEPTH_MAXIMUM to 10000
Browse files Browse the repository at this point in the history
The previous value of 1_000 was added with a reference to the Bison
parser[^1], but the value of YYMAXDEPTH in the Bison docs is 10_000,
not 1_000.

[^1]: https://www.gnu.org/software/bison/manual/html_node/Memory-Management.html

Fixes [Bug #21044]

ruby/prism@e098533ab4

Co-authored-by: Nony Dutton <[email protected]>
  • Loading branch information
2 people authored and matzbot committed Jan 16, 2025
1 parent 91918bb commit 931a870
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prism/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* specifying a maximum depth to which we are allowed to recurse.
*/
#ifndef PRISM_DEPTH_MAXIMUM
#define PRISM_DEPTH_MAXIMUM 1000
#define PRISM_DEPTH_MAXIMUM 10000
#endif

/**
Expand Down

0 comments on commit 931a870

Please sign in to comment.