summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-23 17:47:04 -0300
committerGabriel Schneider <[email protected]>2026-11-23 17:50:13 -0300
commitfcc08ec6ceb9af11aeda8489cef0d4085878ef48 (patch)
tree81eee9825ad2ed222c25bc9a35958f71e2d00a82 /test
parent6de26a20a5fb547f3d032f6ae2062066f356a659 (diff)
downloadpardes-fcc08ec6ceb9af11aeda8489cef0d4085878ef48.tar.gz
pardes-fcc08ec6ceb9af11aeda8489cef0d4085878ef48.zip
theme files: one nested deeper than 64 levels is refused in words before std's ZON parser sees it: round 1 inferred a stack overflow from core/colors.zig `loadThemeFile` (std.zon.parse.fromSlice, whose std.zig parser recurses a level a bracket with no bound); RUN (the test below on the base, Debug, a 16 MiB stack): 10 and 1 000 levels refused in words (a type error, with its line), 2 000 too, 5 000 a SEGMENTATION FAULT in std/zig/Parse.zig (parseTypeExpr, parsePrimaryTypeExpr: the stack), so a theme file of some 10 KB of `.{` ended the session, and every session after it whose config loads that theme at its start; a user hits it only with a file made so; the theme file is the one ZON from outside the program (the config file is lines of words); now `nesting` counts how deep its brackets go with std's own tokenizer (iterative: strings and comments are tokens of their own, nothing is parsed twice), and past `max_theme_nesting` (64; the schema is three deep) the file is refused as any bad theme file is, its pane told "theme file <path>: nested past 64 levels" and the theme in effect kept; test: core/colors.zig "a theme file nested 10, 1 000 and 100 000 deep is refused in words, never a stack overflow"; core-test Debug theme tests 26/27 (1 skipped)
Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions