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 {
119
119
/// explicitly specify one. Debug builds of the parser consume a lot more stack
120
120
/// space and thus have a lower default maximum nesting level.
121
121
#if DEBUG
122
- static let defaultMaximumNestingLevel = 25
122
+ static let defaultMaximumNestingLevel = 20
123
123
#else
124
124
static let defaultMaximumNestingLevel = 256
125
125
#endif
Original file line number Diff line number Diff line change @@ -23,8 +23,8 @@ public class ParserTests: XCTestCase {
23
23
let fileContents = try Data ( contentsOf: fileURL)
24
24
let parsed = fileContents. withUnsafeBytes ( { buffer in
25
25
// 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 )
28
28
} )
29
29
assertDataEqualWithDiff (
30
30
Data ( parsed. syntaxTextBytes) ,
You can’t perform that action at this time.
0 commit comments