You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Array's hole should be undefined rather than 0 #323
Rust toolchain (if building from source): rustc 1.95.0 (59807616e 2026-04-14)
Installed via: from source
Diagnostic output
Perry Doctor
Environment Checks
──────────────────
✓ perry version: 0.5.408
✓ update status: up to date
✓ clang (LLVM codegen): clang version 22.1.3
✓ system linker (cc): cc (GCC) 15.2.1 20260209
✓ runtime library: /home/codehz/Projects/perry/target/release/libperry_runtime.a
⚠ project config (perry.toml): not found - run: perry init
All critical checks passed with some warnings.
Implementation uses an internal TAG_HOLE sentinel for never-written slots so Object.keys / in can distinguish a hole from an explicit arr[i] = undefined write, while reads translate HOLE → UNDEFINED so user code never sees the sentinel. Pinned via test-files/test_issue_323_array_holes.ts — exercises your repro shape plus the MIN_ARRAY_CAPACITY=16 padding boundary, the empty-array edge, and a function-scoped for-loop hitting the bounded-index inline fast path.
Activity
[-]Array cannot have hole in perry[/-][+]Array's hole should be undefined rather than 0[/+]proggeramlug commentedon Apr 30, 2026
Fixed in 2f04bb1 (v0.5.412). Your literal repro now matches Node byte-for-byte:
Implementation uses an internal
TAG_HOLEsentinel for never-written slots soObject.keys/incan distinguish a hole from an explicitarr[i] = undefinedwrite, while reads translate HOLE → UNDEFINED so user code never sees the sentinel. Pinned viatest-files/test_issue_323_array_holes.ts— exercises your repro shape plus theMIN_ARRAY_CAPACITY=16padding boundary, the empty-array edge, and a function-scoped for-loop hitting the bounded-index inline fast path.fix(runtime): sparse-array gap-fill uses TAG_HOLE not 0.0 (v0.5.738)
fix(object): Object.keys/values/entries on a string no longer SIGSEGV (…