Skip to content

Fix panics on assignments with empty left or right side - #367

Merged
mattn merged 1 commit into
masterfrom
fix-empty-lets-panic
Jul 9, 2026
Merged

Fix panics on assignments with empty left or right side#367
mattn merged 1 commit into
masterfrom
fix-empty-lets-panic

Conversation

@mattn

@mattn mattn commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Found by fuzzing:

  • = 1 crashed the parser indexing an empty expression list in the exprs '=' exprs action
  • a, b = crashed the VM indexing an empty right-hand-side value list in LetsStmt
  • x, y, z = <- ch silently did nothing because the grammar action left the statement unset for 3+ left-hand expressions

These now report parse errors, and the VM guards LetsStmt against empty expression lists.

@mattn
mattn merged commit b5f1288 into master Jul 9, 2026
12 checks passed
@mattn
mattn deleted the fix-empty-lets-panic branch July 10, 2026 00:43
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