Skip to content

Apply recursion limit without std - #2465

Open
LucaCappelletti94 wants to merge 1 commit into
apache:mainfrom
LucaCappelletti94:no-std-recursion-limit
Open

Apply recursion limit without std#2465
LucaCappelletti94 wants to merge 1 commit into
apache:mainfrom
LucaCappelletti94:no-std-recursion-limit

Conversation

@LucaCappelletti94

Copy link
Copy Markdown
Contributor

Parser::with_recursion_limit documented a hard parser depth limit, but builds without std used a stub RecursionCounter that always succeeded. Deeply nested input could overflow the stack instead of returning ParserError::RecursionLimitExceeded.

This makes the counter use alloc::rc::Rc and core::cell::Cell, which are available without std, and adds a --no default-features runtime test to the no-std CI path.

@LucaCappelletti94
LucaCappelletti94 marked this pull request as ready for review August 30, 2026 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant