Skip to content

Fix Squirrel TIC and BOOT stack leak - #3064

Merged
nesbox merged 1 commit into
nesbox:mainfrom
HarshDhru23:fix/squirrel-stack-leak-3005
Oct 9, 2026
Merged

nesbox merged 1 commit into
nesbox:mainfrom
HarshDhru23:fix/squirrel-stack-leak-3005

Conversation

@HarshDhru23

Copy link
Copy Markdown
Contributor

Fixes #3005

TIC() and BOOT() were leaving values on the Squirrel VM stack after execution. This caused the stack to grow over time.

This PR adds the missing stack cleanup on both success and error paths. It also ensures that the OVR() callback invoked from TIC() properly cleans up its stack entries.

Testing

  • Debug and Release builds passed locally.
  • Automated tests passed.
  • Repeated stack-balance checks passed without stack growth.
  • Squirrel demo smoke tests passed.

@nesbox
nesbox merged commit 762ec29 into nesbox:main Oct 9, 2026
11 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.

Squirrel: TIC() and BOOT() leak two stack frames per call

2 participants