Skip to content

Conversation

@gnurizen
Copy link
Collaborator

We were decrementing the slot when PC was out of bounds which is wrong
because LuaJIT reuses stack slots for locals in different scopes. This
caused us to hit on local var lookup instead of failing and falling
through to looking at bytecode names.

Add a test case lifted from luajit that shows slots being reused for
different variables and remove old unhelpful test case.

We were decrementing the slot when PC was out of bounds which is wrong
because LuaJIT reuses stack slots for locals in different scopes. This
caused us to hit on local var lookup instead of failing and falling
through to looking at bytecode names.

Add a test case lifted from luajit that shows slots being reused for
different variables and remove old unhelpful test case.
@brancz brancz merged commit fa444a2 into main Dec 18, 2024
22 checks passed
@brancz brancz deleted the varinfo-fix branch December 18, 2024 08:12
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.

3 participants