Skip to content

Update test262 to 673e9bac and fix newly-revealed issues#2473

Merged
lahma merged 1 commit into
sebastienros:mainfrom
lahma:test262-update-2026-05-14
May 14, 2026
Merged

Update test262 to 673e9bac and fix newly-revealed issues#2473
lahma merged 1 commit into
sebastienros:mainfrom
lahma:test262-update-2026-05-14

Conversation

@lahma

@lahma lahma commented May 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Bumps the Test262 suite hash from 2b2ecead to 673e9bac, which brings stage-4 spec updates for the immutable-arraybuffer proposal and a stricter ArrayBuffer.prototype.sliceToImmutable algorithm. Twelve previously failing test cases now pass:

  • built-ins/ArrayBuffer/prototype/sliceToImmutable/this-shrinks.js
  • built-ins/ArrayBuffer/prototype/sliceToImmutable/argument-coercion.js
  • built-ins/TypedArrayConstructors/from/custom-ctor-returns-immutable-arraybuffer.js
  • built-ins/TypedArrayConstructors/of/custom-ctor-returns-immutable-arraybuffer.js
  • built-ins/Uint8Array/prototype/setFromBase64/throws-when-target-is-backed-by-immutable-arraybuffer.js
  • built-ins/Uint8Array/prototype/setFromHex/throws-when-target-is-backed-by-immutable-arraybuffer.js

Fixes

  • ArrayBufferPrototype.SliceToImmutable rewritten to the latest spec. first/final are still computed from the original len, but the detach check now precedes the bounds check, and a RangeError is thrown when the buffer has shrunk below final during argument coercion.
  • TypeConverter.ToNumber(string) guards against empty input after TrimEx. The pre-trim string.IsNullOrWhiteSpace check misses BOM () and other characters that the spec-compliant TrimEx removes — this previously caused an IndexOutOfRangeException on whitespace-padded empty strings (the new argument-coercion.js reaches that path).
  • Uint8Array.prototype.setFromBase64 / setFromHex call AssertNotImmutable() on the viewed buffer before writing, per the new spec step.
  • %TypedArray%.from / .of call AssertNotImmutable() on a custom constructor's result before populating it (the write mutability intent in TypedArrayCreateFromConstructor).
  • TypedArrayConstructor.IterableToList now passes the already-fetched iterator method through to GetIterator instead of re-reading Symbol.iterator on the source.

CI host crash fix

A FinalizationRegistry cleanup callback can throw arbitrary exceptions (e.g. TimeoutException when engine constraints trip), and they were escaping the GC finalizer thread and aborting the whole test process — visible on this run. The callback invocation is now wrapped in a swallow-all try/catch, matching the spec's intent that these callbacks run in an isolated Job.

Test plan

  • Full test262 suite green: 99013 passed, 0 failed, 133 skipped.
  • Jint.Tests green (2885 passed).
  • Jint.Tests.PublicInterface green (79 passed).
  • Jint.Tests.CommonScripts green (28 passed).

🤖 Generated with Claude Code

@lahma
lahma enabled auto-merge (squash) May 14, 2026 08:55
Bumps the test262 suite to commit 673e9bac, which brings stage-4
spec updates for the immutable-arraybuffer proposal and a stricter
ArrayBuffer.prototype.sliceToImmutable algorithm. Twelve test
cases now pass with the following fixes:

- ArrayBufferPrototype.SliceToImmutable: rewrite to the new spec
  algorithm. first/final are still computed from the original len,
  but the detach check now precedes the bounds check and a
  RangeError is thrown when the buffer has shrunk below final
  during coercion.
- TypeConverter.ToNumber(string): guard against empty input after
  TrimEx. The pre-trim IsNullOrWhiteSpace check misses BOM and
  other characters that the spec-compliant TrimEx removes, which
  previously caused an IndexOutOfRangeException on the
  whitespace-padded empty string used by the new
  argument-coercion.js test.
- Uint8Array.prototype.setFromBase64 / setFromHex: assert the
  viewed buffer is not immutable before writing, per the new
  spec step.
- %TypedArray%.from / .of: assert the buffer of a custom
  constructor's result is not immutable before populating it
  (the "write" mutability intent in TypedArrayCreateFromConstructor).
- TypedArrayConstructor.IterableToList: pass the already-fetched
  iterator method through to GetIterator instead of re-reading
  Symbol.iterator on the source.

Also fixes a CI-host crash on PR sebastienros#2427: a FinalizationRegistry
cleanup callback can throw arbitrary exceptions (e.g. TimeoutException
when engine constraints trip), and they were escaping the GC
finalizer thread and aborting the entire test process. The
callback invocation is now wrapped in a swallow-all try/catch,
matching the spec's intent that these callbacks run in an
isolated Job.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@lahma
lahma force-pushed the test262-update-2026-05-14 branch from 4abc6cc to 7e0a990 Compare May 14, 2026 08:56
@lahma
lahma merged commit 303b60f into sebastienros:main May 14, 2026
4 checks passed
@lahma
lahma deleted the test262-update-2026-05-14 branch May 14, 2026 09:40
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