Skip to content

bundler: report an unresolvable relative import longer than the path buffer instead of panicking in watch mode - #39203

Closed
robobun wants to merge 5 commits into
mainfrom
farm/52488b86/watch-long-specifier-panic
Closed

bundler: report an unresolvable relative import longer than the path buffer instead of panicking in watch mode#39203
robobun wants to merge 5 commits into
mainfrom
farm/52488b86/watch-long-specifier-panic

bundler: report an unresolvable relative import longer than the path …

cb617cd
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Aug 15, 2026 in 23m 48s

Code review found 1 potential issue

Found 3 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 0
🟣 Pre-existing 1
Severity File:Line Issue
🟣 Pre-existing src/resolver/resolver.rs:2473-2481 Same-class sibling sites still use unchecked join_abs_string_buf on user-controlled specifiers

Annotations

Check notice on line 2481 in src/resolver/resolver.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

Same-class sibling sites still use unchecked join_abs_string_buf on user-controlled specifiers

Two more sites join a user-controlled specifier into a fixed path buffer with the unchecked `join_abs_string_buf` and can panic the same way: `HTMLScanner::create_import_record` (src/bundler/HTMLScanner.rs:38 and :60, reached by the dev server / `bun build --watch` on an HTML entry with a long `/`-prefixed `<script src>`) and `FileMap::resolve` (src/bundler/bundle_v2.rs:1007, plus the Windows `path_to_posix_buf` at :955, reached via `Bun.build({ files: {...} })`). Both are pre-existing and in fi