File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ public struct Parser {
119119 /// explicitly specify one. Debug builds of the parser consume a lot more stack
120120 /// space and thus have a lower default maximum nesting level.
121121 #if DEBUG
122- static let defaultMaximumNestingLevel = 25
122+ static let defaultMaximumNestingLevel = 20
123123 #else
124124 static let defaultMaximumNestingLevel = 256
125125 #endif
Original file line number Diff line number Diff line change @@ -23,8 +23,8 @@ public class ParserTests: XCTestCase {
2323 let fileContents = try Data ( contentsOf: fileURL)
2424 let parsed = fileContents. withUnsafeBytes ( { buffer in
2525 // Release builds are fine with the default maximum nesting level of 256.
26- // Debug builds overflow with any stack size bigger than 25 -ish.
27- Parser . parse ( source: buffer. bindMemory ( to: UInt8 . self) , maximumNestingLevel: 25 )
26+ // Debug builds overflow with any stack size bigger than 20 -ish.
27+ Parser . parse ( source: buffer. bindMemory ( to: UInt8 . self) , maximumNestingLevel: 20 )
2828 } )
2929 assertDataEqualWithDiff (
3030 Data ( parsed. syntaxTextBytes) ,
You can’t perform that action at this time.
0 commit comments