Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

NumberAtReadFlow: catch starts from the try's entry state, so a non-Number write before a throw is not seen in the catch (suspected)

Open
#12,666 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Domain
compilers

Research direction

Start in the number_by_construction pass and find how NumberAtReadFlow seeds the entry state for a catch block. First reproduce the example from the issue with node and with perry, since the report says the bug is unconfirmed. Done means the repro shows the mismatch and the catch entry state includes writes made inside the try before a throw.

Written by the indexing model from the issue text.

Description

Found by review in the lblk lane (#12665); not yet reproduced. In number_by_construction's NumberAtReadFlow, a catch block starts from the state at try entry. A write that can make a local non-Number inside the try before a throw is therefore not joined into the catch, e.g.

function f(k) { let v = 1; try { v = k ? undefined : 2; if (k) throw 0; } catch (e) { return v + 1; } return v; }
console.log(f(1)); // node: NaN

Expected fix: the catch entry state is the join of the states at every point in the try that can throw (conservatively: the join of entry and every state reached in the try). Needs a repro run first.

Dominant language
Rust
Stars
4.9k
Forks
166
Avg merge
2h 54m
Merged PRs (30d)
922

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PerryTS/perry

All issues in PerryTS/perry

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.