Skip to content

Fix Lua 5.1 edge cases - #250

Merged
levno-710 merged 1 commit into
masterfrom
fix/lua51-edge-cases
Oct 28, 2026
Merged

levno-710 merged 1 commit into
masterfrom
fix/lua51-edge-cases

Conversation

@levno-710

Copy link
Copy Markdown
Member

Fixes five Lua 5.1 compatibility issues found through adversarial testing:

  • Normalize long-string line endings and correctly omit the initial newline.
  • Evaluate surplus assignment expressions and local initializers for side effects and errors, while still skipping literals.
  • Avoid unintended function environment lookups when Cff returns.
  • Preserve negative zero in Vmify and Cff, including when positive and negative zero appear together.
  • Preserve native Lua 5.1 write order in multiple assignments.

Adds regression tests for each issue, including nested functions, strict environments, metatable side effects, and spilled registers.

@levno-710
levno-710 merged commit c988b7c into master Oct 28, 2026
1 check passed
@levno-710
levno-710 deleted the fix/lua51-edge-cases branch October 28, 2026 19:36
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.

1 participant