Skip to content

bun test: stop panicking on a path argument or tree entry longer than the path buffer - #35863

Merged
Jarred-Sumner merged 3 commits into
mainfrom
claude/farm/93228605/join-abs-overflow-bound
Aug 18, 2026
Merged

bun test: stop panicking on a path argument or tree entry longer than the path buffer#35863
Jarred-Sumner merged 3 commits into
mainfrom
claude/farm/93228605/join-abs-overflow-bound

bun test: skip paths longer than MAX_PATH_BYTES in the scanner instea…

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

Code review found 1 potential issue

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

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit test/cli/test/bun-test.test.ts:1889 maxPathBytes constant does not match source on non-Linux/non-macOS POSIX (FreeBSD)

Annotations

Check warning on line 1889 in test/cli/test/bun-test.test.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

maxPathBytes constant does not match source on non-Linux/non-macOS POSIX (FreeBSD)

`isMacOS ? 1024 : 4096` doesn't mirror `MAX_PATH_BYTES` in `src/bun_core/util.rs`: the source uses 4096 only under `cfg!(any(target_os = "linux", target_os = "android"))` and 1024 on every other POSIX (FreeBSD/OpenBSD/NetBSD/DragonFly/Solaris), not just macOS. FreeBSD is a shipped build target, and there the deep-tree test would compute `fitDepth ≈ 15` instead of ~3 — its assertions still pass, but it doesn't exercise the boundary its comments describe. Consider `isLinux ? 4096 : 1024` (importin