Skip to content

Skip frame register clearing when a call has extra arguments - #146

Merged
iyaz-shaikh merged 1 commit into
mainfrom
iyaz/fix-push-lua-frame-clear
Oct 7, 2026
Merged

iyaz-shaikh merged 1 commit into
mainfrom
iyaz/fix-push-lua-frame-clear

Conversation

@iyaz-shaikh

Copy link
Copy Markdown
Member

#145 panics with slice bounds out of range when a Lua function gets more arguments than it has registers, e.g. local function noop() end noop(nil, "x", {}).
The clear now only runs when its start is below ci.top; extra arguments are already discarded when l.top is reset.
Fixes the 59 failures and 14 errors in genghis-flows unit tests; the full suite passes with this change.

🤖 Generated with Claude Code

When a caller passes more arguments than the callee has registers, l.top is
past ci.top and the clear added in #145 panics on a backwards slice.
The extra arguments are already discarded when l.top is reset to ci.top.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@iyaz-shaikh iyaz-shaikh self-assigned this Oct 7, 2026
@iyaz-shaikh
iyaz-shaikh requested review from a team and abecevello October 7, 2026 13:18
@iyaz-shaikh
iyaz-shaikh merged commit 3f823f8 into main Oct 7, 2026
1 check passed
@iyaz-shaikh
iyaz-shaikh deleted the iyaz/fix-push-lua-frame-clear branch October 7, 2026 13:23
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.

2 participants