Skip to content

Prevent nil dereference during package export resolution - #64419

Draft
Daniel Rosenwasser (DanielRosenwasser) with Copilot wants to merge 4 commits into
mainfrom
copilot/fix-nil-pointer-dereference
Draft

Daniel Rosenwasser (DanielRosenwasser) with Copilot wants to merge 4 commits into
mainfrom
copilot/fix-nil-pointer-dereference

Conversation

Copilot AI commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Package exports/imports resolution could dereference a nil lookup table during program construction.

  • Resolution: Treat a nil exports/imports table as empty and continue searching.
  • Regression coverage: Exercise the nil-table path directly.

Co-authored-by: DanielRosenwasser <972891+DanielRosenwasser@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix likely nil pointer dereference during program construction Prevent nil dereference during package export resolution Sep 24, 2026
@DanielRosenwasser

Copy link
Copy Markdown
Member

Copilot you need a realistic test case that is not just a unit test

Agent-Logs-Url: https://github.com/microsoft/TypeScript/sessions/19c127c7-891c-4c63-9768-a1600188ea6c

Co-authored-by: DanielRosenwasser <972891+DanielRosenwasser@users.noreply.github.com>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot can you modify this to a compiler test that is not a simple unit test?

Co-authored-by: DanielRosenwasser <972891+DanielRosenwasser@users.noreply.github.com>

Copilot AI commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Copilot can you modify this to a compiler test that is not a simple unit test?

Addressed in cb5755f. The coverage is now a compiler test using normal package.json exports resolution during program construction; the cache-injection unit test was removed.

Copilot you need a realistic test case that is not just a unit test

Addressed in cb5755f. The synthetic resolver test is replaced with a compiler test that constructs a program from two root files and resolves a real package trailing-slash export mapping.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Likely nil pointer dereference during program construction

2 participants