Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix varinfo parsing for luajit local var name lookup #28

Merged
merged 1 commit into from
Dec 18, 2024
Merged

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.

2 participants