Skip to content

fix: clamp set_max_stack_size to avoid QuickJS stack limit underflow#678

Merged
richarddd merged 1 commit intoDelSkayn:masterfrom
richarddd:fix/max-stack-size-overflow
Apr 27, 2026
Merged

fix: clamp set_max_stack_size to avoid QuickJS stack limit underflow#678
richarddd merged 1 commit intoDelSkayn:masterfrom
richarddd:fix/max-stack-size-overflow

Conversation

@richarddd
Copy link
Copy Markdown
Collaborator

Issue

Fixes #437

Description of changes

Runtime::set_max_stack_size now clamps its argument to a safe maximum so QuickJS's stack_top - stack_size subtraction cannot underflow when callers pass values like usize::MAX.

Checklist

  • Added change to the changelog
  • Created unit tests for my feature if needed

@richarddd richarddd force-pushed the fix/max-stack-size-overflow branch from e2a6d8a to 64fdaaa Compare April 24, 2026 12:28
@richarddd richarddd merged commit 347df1b into DelSkayn:master Apr 27, 2026
34 checks passed
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.

usize::MAX causes set_max_stack_size to crash

2 participants