Skip to content

Preserve BigInt coercion failures - #98

Open
chicoxyzzy wants to merge 1 commit into
mainfrom
fix/bigint-rope-oom-propagation
Open

Preserve BigInt coercion failures#98
chicoxyzzy wants to merge 1 commit into
mainfrom
fix/bigint-rope-oom-propagation

Conversation

@chicoxyzzy

@chicoxyzzy chicoxyzzy commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • route callable ToPrimitive property reads through the same accessor-aware polymorphic lookup as ordinary objects
  • centralize charged rope materialization and preserve OOM through ToBigInt, BigInt/String loose equality, and relational comparison
  • add end-to-end accessor/OOM coverage, a BigInt/String loose-equality microbenchmark, and corrected DataView spec anchors

Root cause

Function coercion used raw function data-slot reads, which skipped own and inherited accessor descriptors. Separately, BigInt conversion and loose equality read ropes through flatBytes(), whose safe fallback turns a materialization allocation failure into an empty string; the equality parser also collapsed parser OOM into an ordinary mismatch.

Impact

Callable coercion now observes getters and abrupt completions per §7.1.1. BigInt string conversion paths consistently enforce the heap memory ceiling and report allocation failure instead of changing the input or comparison result.

Validation

  • zig build test-fast --summary all — 3,390 passed, 267 expected skips
  • callable ToPrimitive focused suite — 32/32 passed
  • broad BigInt focused suite — 56 passed, 2 expected skips
  • end-to-end BigInt/String equality OOM suite — 31/31 passed
  • zig build bench -- --filter=loose_eq_bigint_string --runs=1 — fixture smoke-tested at 66.62 ms
  • test262-safe: BigInt 77/77; DataView BigInt setters 25/25 (2 proposal fixtures out of scope); BigInt typed-array Set 27/27
  • test262-safe: equality 46 pass + 1 known baseline failure; all four relational buckets 180 pass + 4 known baseline failures
  • every focused test262-safe bucket above reproduced the same pass set under --gc-threshold=1
  • three independent read-only reviews completed; final verdicts clean

GitHub CI and the bidirectional remote A/B performance screen are in progress while this remains draft.

@chicoxyzzy
chicoxyzzy marked this pull request as ready for review August 10, 2026 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant