ECMA-262 in Lean

Specification issues & decisions · spec/DECISIONS.md, docs/spec-issues/

Spec issues & errata

All 57 specification defects, non-literal SpecTec readings, and proposed normative changes encountered when formalizing ECMA-262 (54 defects of the text and 3 proposed normative changes, paired with 54 long-form write-ups): the sentences quoted from spec.html, the reading baked into spec/spectec/, upstream TC39 status, and verified demonstration programs.

How to read this page

Each entry names the sentences of ECMA-262 (at b1eaed82f) it concerns, quoted from the pinned spec.html (every step, grammar production, or rule checked by SHA-256 hash or normalized text when the site builds), alongside its candidate readings: the literal text as written; the test262 reading required by test262 (at 2e58f87d); and the proposed reading drafted in its place. SpecTec bakes one resolved reading directly into spec/spectec/ and records every non-literal choice in spec/DECISIONS.md: across the 57 entries, 33 follow test262, 13 bake in a proposed fix, and 11 keep the literal wording (43 in algorithms and early errors, 10 in the grammars and parser, and 4 in prose relations).

Every entry links to its long-form committee write-up (docs/spec-issues/NN-*.md), which traces the issue step by step from the specification text alone, tracks upstream tc39/ecma262 and tc39/test262 issues and pull requests (checked 2026-11-19, 2026-11-20, 2026-12-01 in docs/spec-issues/upstream.tsv), and proposes an editorial change.

52 of the 57 entries have a runnable JavaScript example: 49 are verified on native ecma-run (49 runs checked at build time, with object addresses normalized to #N), and the write-ups' examples are also recorded across all four engines:

  • V8 (node): v24.18.1 (V8 13.6.233.17-node.50)
  • SpiderMonkey (js140): JavaScript-C140.13.0
  • JavaScriptCore (bun): Bun 1.3.13+bf2e2cecf (JavaScriptCore of oven-sh/WebKit 4d5e75ebd84a14edbc7ae264245dcd77fe597c10)
  • The formal model: ecma-run, built from this repository at the commit this site was built from.

Defects of the text (54)

Places where the text, read as written, gives no answer, an answer that contradicts another sentence, or an answer test262 does not accept — including every place where SpecTec bakes in a non-literal choice so the formal specification and reference engine are well-defined.

ErratumClauseWrite-upSpecTecUpstreamProgram
UnitChainChild14.13.2 Static Semantics: IsLabelledFunction36. IsLabelledFunction tests a |Statement| node for being a |LabelledStatement|: always falsetest262 specnone foundyes
StringValueReservedWord13.1.1 Static Semantics: Early Errors32. Identifier early errors take the StringValue of a |ReservedWord|, which StringValue does not definetest262 specissue #1865 openyes
LookaheadSourceTokens5.1.6.7 Lookahead Restrictions44. Lookahead restrictions over an automatically inserted semicolontest262 parsernone foundyes
HTMLCloseCommentTokenB.1.1 HTML-like Comments41. Annex B: a first-line --> is an input element that is neither a comment nor a tokentest262 parsernone foundyes
AnnexBRegExpOrderB.1.2 Regular Expressions Patterns40. Annex B: what §B.1.2's ordered alternatives choose, and which |Pattern| its group-number condition countstest262 parserPR #2445 openyes
AnnexBGroupCountB.1.2 Regular Expressions Patterns40. Annex B: what §B.1.2's ordered alternatives choose, and which |Pattern| its group-number condition countstest262 parserPR #2445 openyes
AnnexBModifierEarlyErrors22.2.1.1 Static Semantics: Early Errors26. Annex B: /(?ii:a)/ has no early error under §B.1.2test262 specnone foundyes
CoveredNodeParent5.1.5 The Syntactic Grammar46. A covered Parse Node is outside the tree that covers ittest262 parsernone foundyes
NumberMultiplyZeroSign6.1.6.1.4 Number::multiply01. Number::multiply gives +0 for +0 × -5proposed specPR #4072 openyes
GatherAvailableAncestorsEmptyCycleRoot16.2.1.6.1.3.3 GatherAvailableAncestors02. GatherAvailableAncestors reads the [[CycleRoot]] of a module whose evaluation threwliteral specissue #3766 open, PR #3769 openyes
BuiltinReturnCompletion10.3.3 BuiltinCallOrConstruct03. A built-in async function's promise fulfils with undefinedtest262 specPR #4074 openyes
ExecuteModuleAsyncDisposeResources16.2.1.7.3.2 ExecuteModule04. A module with top-level await never disposes its top-level resourcestest262 specissue #4039 open, PR #4007 closed unmergedyes
ParseTextErrorObjects11.1.6 Static Semantics: ParseText05. ParseText creates SyntaxError objects without a realmproposed specnone foundyes
DoWaitSyncTimeout25.4.3.14 DoWait06. A synchronous Atomics.wait that times out returns "ok"test262 specnone foundyes
AtomicsWaitAsyncTimeoutAssert25.4.3.15 EnqueueAtomicsWaitAsyncTimeoutJob09. EnqueueAtomicsWaitAsyncTimeoutJob passes a negative delay, and its Assert can failliteral specnone foundyes
AtomicsWaitAsyncTimeoutNegativeDelay25.4.3.15 EnqueueAtomicsWaitAsyncTimeoutJob09. EnqueueAtomicsWaitAsyncTimeoutJob passes a negative delay, and its Assert can failliteral specnone foundyes
GetUTCEpochNanosecondsNaN21.4.1.26 UTC10. new Date(0).setHours(1e21): UTC ( t ) reaches a failing Assertliteral specPR #3464 openyes
MakeDayFiniteTimeValue21.4.1.28 MakeDay10. new Date(0).setHours(1e21): UTC ( t ) reaches a failing Assertproposed specPR #3464 openyes
GetMatchStringStartAfterEnd22.2.7.2 RegExpBuiltinExec11. /u with lastIndex inside a surrogate pair: a match reported one code unit late, and a Match Record that ends before it startsliteral specissue #128 open, issue #2511 openyes
AsyncBlockStartAwaitResult27.10.5.2 AsyncBlockStart12. AsyncBlockStart asserts unused, but Await resumes it with emptytest262 specissue #3435 openyes
PromiseJobAbruptCompletion27.5.2.1 NewPromiseReactionJob13. NewPromiseReactionJob can return a throw completion, and null-realm promise Jobs run user code without a specified agent or realmliteral specnone foundyes
NativeFunctionInitialName20.2.3.5 Function.prototype.toString14. Function.prototype.toString has no conforming result for some [[InitialName]] valuesliteral specrelated: PR #2695 openyes
SyntheticModuleLinkResets16.2.1.8.4.4 Link15. A second Link of a Synthetic Module Record resets its exports, observably with JSON modulesliteral specissue #3989 openyes
CreateDynamicFunctionPrivateIdentifiers20.2.1.1.1 CreateDynamicFunction20. new Function("o", "return o.#f"): no check of private names in dynamic functionsproposed specnone foundyes
LonePropertyGeneralCategoryAssert22.2.2.9 Runtime Semantics: CompileToCharSet24. CompileToCharSet asks UnicodeMatchPropertyValue for a General_Category value before testing that it is onetest262 specissue #3586 open, PR #3587 openyes
PropNameCoverInitializedName13.2.5.1 Static Semantics: Early Errors29. ({a = 1});: the __proto__ early error asks for the PropName of a CoverInitializedName, which has noneproposed specnone foundyes
AllocateSharedArrayBufferByteLengthStore25.2.2.1 AllocateSharedArrayBuffer43. AllocateSharedArrayBuffer stores a growable buffer's length with SetValueInBuffer on a Shared Data Blocktest262 specPR #4023 closed unmergedyes
ContainsAwaitCover8.5.1 Static Semantics: Contains35. Contains never finds an |AwaitExpression|: async function f(x = await 1) {} has no early errortest262 specnone foundyes
SplitCodeUnitStrings22.1.3.23 String.prototype.split37. String.prototype.split with an empty separator builds an Array of code unitstest262 specnone foundyes
OrdinarySetReceiverHasProperty10.1.9.2 OrdinarySetWithOwnDescriptor38. OrdinarySetWithOwnDescriptor asserts what a Proxy receiver's trap need not tellproposed specnone foundyes
MustCoverEarlyErrorOrder5.1.5 The Syntactic Grammar39. Early error rules read "the |n| that is covered by" a cover that covers nothingtest262 specnone foundyes
RacesNotBoth29.8 Races23. Races: "it is not the case that both" is always trueliteral nonePR #4021 closed unmerged
InitHappensBeforeOverlap29.6.6 happens-before48. happens-before orders an init write only before events with overlapping ranges, which excludes the equal range of a 1-byte accessliteral nonenone found
MemoryRangeSameBlock29.6.2 reads-bytes-from50. reads-bytes-from and coherent reads ask only for a byte index in a memory range, which names no [[Block]]proposed nonenone found
CreateIntrinsicsAsyncArgument9.3.2 CreateIntrinsics33. CreateIntrinsics passes async in prefix's position: every built-in gets a Boolean prefixtest262 specissue #3534 open, issue #4046 openyes
SortInfiniteComparator23.1.3.30.1 SortIndexedProperties31. Sort: a comparator that returns ±∞ is neither consistent nor inconsistenttest262 specnone foundyes
UnregisterIteratesCopy26.2.3.3 FinalizationRegistry.prototype.unregister45. FinalizationRegistry.prototype.unregister removes cells from the List it iteratestest262 specnone foundyes
IsCharacterClassControlLetterB.1.2.3 Static Semantics: IsCharacterClass49. Annex B: /[\c1-\c5]/ asks for the IsCharacterClass of ClassEscape :: c ClassControlLetter, which has nonetest262 specnone foundyes
StringLengthOverflow22.1.3.18 String.prototype.repeat53. String operations omit > 2^53 - 1 length checks required by §6.1.4's maximum String lengthproposed specnone foundyes
RegExpUnicodeEscapeLookahead22.2.1 Patterns55. RegExpUnicodeEscapeSequence: escaped surrogate pairs are ambiguous in the formal grammartest262 parsernone foundyes
PostASILexicalGoal12 ECMAScript Language: Lexical Grammar56. Post-ASI / lexical goal selection and non-Script ParseText starting goalstest262 parsernone foundyes
ForLexicalHeaderASI12.10.1 Rules of Automatic Semicolon Insertion57. ASI in for ( LexicalDeclaration … ) headers, left-to-right prefix order, and [no LineTerminator here] in lookahead setstest262 parsernone foundyes
CoverMatchedVirtualSemis5.1.5 The Syntactic Grammar58. Cover-grammar reparsing omits semicolons inserted by ASI inside the covertest262 parsernone foundyes
RegExpExecEndOfString22.2.7.2 RegExpBuiltinExec59. RegExpBuiltinExec step 13.b indexes out-of-bounds element _lastIndex_ of _string_ at end of stringtest262 specnone foundyes
AnnexBFunctionEvalEmpty15.2.6 Runtime Semantics: Evaluation60. Annex B.3.2 block-function replacement steps return ~unused~ instead of ~empty~test262 specnone foundyes
AnnexBQuantifiableAssertionB.1.2.5 Runtime Semantics: CompileSubpattern61. Annex B.1.2.5 CompileSubpattern calls undefined 2-argument CompileAtom on QuantifiableAssertiontest262 specnone foundyes
AnnexBCapturingParensAssert22.2.1.2 Static Semantics: CountLeftCapturingParensWithin62. CountLeftCapturingParensWithin step 1 fails its #sec-patterns Assert: on every quantified §B.1.2 termtest262 specnone foundyes
AnnexBReplacingAndB3310.2.11 FunctionDeclarationInstantiation63. Annex B.3.2 type errors (Early Errors for _func_, Contains on Parse Nodes), §B.3.3 synthetic blocks, and §B.1.1 comment ambiguitytest262 specnone foundyes
SupplementalCoveredBy13.3.6.1 Runtime Semantics: Evaluation64. Supplemental syntax "covered by" without "must cover", and DestructuringAssignmentTarget cover-node mismatchtest262 specnone foundyes
ToISOStringYearForm21.4.4.36 Date.prototype.toISOString65. Date.prototype.toISOString leaves 4-digit vs expanded ±YYYYYY year format unspecified for 0..9999test262 specnone foundyes
ModuleDiamondCircularityAsserts16.2.1.7.2.1 GetExportedNames66. GetExportedNames and ResolveExport assert circularity on acyclic diamond export * module graphstest262 specnone foundyes
MemoryModelRMWCycleAndRbf29.5.4 ComposeWriteEventBytes67. §29 Memory Model: overlapping-RMW ValueOfReadEvent cycle non-termination, unquantified reads-bytes-from, and HostEventSetproposed nonenone found
WeakRefAllCellsAndSuspendWaiter9.9.3 Execution68. WeakRef execution single-cell loop, SuspendThisAgent's NotifyWaiter argument, "Canonical property value" column, and metamodel sort gapsproposed specissue #3328 openyes
IfAbruptRejectPromiseInPromiseReturn16.2.1.8.4.5 Evaluate69. Synthetic Module Record.Evaluate and AsyncFromSyncIteratorContinuation expand IfAbruptRejectPromise's ? inside : a Promise operationsliteral specnone found

UnitChainChild

SpecTec: test262layer: spec

Write-up 36: IsLabelledFunction tests a |Statement| node for being a |LabelledStatement|: always false →

§14.13.2 Static Semantics: IsLabelledFunction, steps 1 and 2

If stmt is not a LabelledStatement, return false. … Let item be the LabelledItem of stmt.

Formalization note

"the X of n" names a child of n (§5.1.2 gives a node only its right-hand side's children), so IsLabelledFunction 1-2 never find the LabelledStatement under a Statement node: read by §5.1.2 alone, step 1 returns false for every Statement node and if (1) l: function f() {} is valid; test262's labelled-fn-stmt*.js require a SyntaxError. The model reads "n is a X" through the unit chain, so its literal reading passes step 1 and stops (a sort error) at step 2, where n's production has no X. The test262 and proposed reading: X is taken from the first node of n's unit chain whose production has one.

In SpecTec
The test262 reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: none found (searched for "IsLabelledFunction", whose one hit is a Temporal pull request). Issue #1811 (closed, 2019-12), "Chain production definition", is about the term.

The program tests/run/erratum_unit_chain_child.js, verified with ecma-run --web-browser tests/run/erratum_unit_chain_child.js:

The test262 reading (baked into SpecTec · verified)throw: SyntaxError
The literal text (alternative reading)stop: sortError sec-islabelledfunction#0 2: stops at §14.13.2 Static Semantics: IsLabelledFunction, step 2 (a value of the wrong sort reaches the step)

Cross-engine runs

Source
// IsLabelledFunction takes "the |LabelledItem| of" a |Statement| node through
// its unit chain (Erratum UnitChainChild, test262's reading): the labelled
// function in an if body is the Early Error of sec-if-statement-static-semantics-early-errors.
// args: --web-browser
// expect: throw: SyntaxError
if (1) l: function f() {}

StringValueReservedWord

SpecTec: test262layer: spec

Write-up 32: Identifier early errors take the StringValue of a |ReservedWord|, which StringValue does not define →

§13.1.1 Static Semantics: Early Errors, the early-error rule of Identifier : IdentifierName but not ReservedWord

It is a Syntax Error if the StringValue of IdentifierName is the StringValue of any ReservedWord except for yield or await.

The test262 and proposed readings

It is a Syntax Error if the StringValue of IdentifierName is the String value of any terminal of ReservedWord except for yield or await.

Formalization note

"the StringValue of any ReservedWord except for yield or await" takes the StringValue of a ReservedWord, for which StringValue has no row. The literal text stops there. The test262 and proposed reading: the StringValue of a terminal is the String value of its code points (test262's val--via-escape-.js require a SyntaxError for an IdentifierName that spells a reserved word with escapes).

In SpecTec
The test262 reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: issue #1865 (open, 2020-02), ""StringValue of ReservedWord" is used but not defined", reports it; a reply there (2020-02-05) answers that "A reserved word is an IdentifierName", so that StringValue's |IdentifierName| row is meant to apply. No pull request was found.

The program tests/run/erratum_stringvalue_reserved_word.js, verified with ecma-run tests/run/erratum_stringvalue_reserved_word.js:

The test262 reading (baked into SpecTec · verified)throw: SyntaxError
The literal text (alternative reading)stop: sortError ph-stringvalue-any-nt-except#0 1: stops at ph-stringvalue-any-nt-except (a helper clause of SpecTec), step 1 (a value of the wrong sort reaches the step)

Cross-engine runs

Source
// An |IdentifierName| spelling `if` with an escape is the String value of a
// terminal of |ReservedWord| (Erratum StringValueReservedWord, test262's reading).
// expect: throw: SyntaxError
var \u0069f;

LookaheadSourceTokens

SpecTec: test262layer: parser

Write-up 44: Lookahead restrictions over an automatically inserted semicolon →

§5.1.6.7 Lookahead Restrictions

If the phrase “[lookahead = seq]” appears in the right-hand side of a production, it indicates that the production may only be used if the token sequence seq is a prefix of the immediately following input token sequence.

§12.10 Automatic Semicolon Insertion

These situations are described by saying that semicolons are automatically inserted into the source code token stream in those situations.

Formalization note

A lookahead restriction reads "the immediately following input token sequence" (§5.1.6.7), and §12.10 inserts semicolons "into the source code token stream": the text does not say whether an inserted semicolon is a token a lookahead reads. Read as one, if (0) let LF [a] = 0; is a sentence. The literal text stops wherever a lookahead reads at an inserted semicolon. The test262 and proposed reading: a lookahead reads the source's tokens, past the semicolons §12.10 inserted (test262's let-array-with-newline.js require a SyntaxError).

In SpecTec
The test262 reading.
Layer
Grammar & parser. Baked into the SpecTec grammars (spec/spectec/01..07-grammar-*.spectec) and the parser.
Upstream
Checked 2026-11-19: none found (searched for lookahead with "semicolon insertion"). Issue #3269 (open, 2024-01), "Suggestion: [no ASI if lookahead ...] constraint instead of SS rules for OptionalChain", proposes a constraint for OptionalChain and does not ask what a lookahead reads after an inserted semicolon.

The program tests/run/erratum_lookahead_source_tokens.js, verified with ecma-run tests/run/erratum_lookahead_source_tokens.js:

The test262 reading (baked into SpecTec · verified)throw: SyntaxError
The literal text (alternative reading)normal: undefined

Cross-engine runs

Source
// The inserted `;` after `let` is no source token: ExpressionStatement's lookahead
// reads `let [` and the program has no parse (Erratum LookaheadSourceTokens,
// test262's reading).
// expect: throw: SyntaxError
if (0) let
[a] = 0;

HTMLCloseCommentToken

SpecTec: test262layer: parser

Write-up 41: Annex B: a first-line --> is an input element that is neither a comment nor a token →

§B.1.1 HTML-like Comments, the definition of InputElementHashbangOrRegExp

InputElementHashbangOrRegExp :: WhiteSpace LineTerminator Comment CommonToken HashbangComment RegularExpressionLiteral HTMLCloseComment

§5.1.3 The Lexical and RegExp Grammars

Input elements other than white space and comments form the terminal symbols for the syntactic grammar for ECMAScript and are called ECMAScript tokens.

Formalization note

B.1.1 adds HTMLCloseComment as an alternative of InputElementHashbangOrRegExp of its own, not under Comment, and §5.1.3 drops only white space and comments from the input elements: literally a first-line --> is a token that no syntactic production has, and the Script has no parse (a SyntaxError). The test262 and proposed reading: an HTMLCloseComment input element is a comment (test262's single-line-html-close-first-line-{1,2,3}.js).

Read as written
The text never stops a run.
In SpecTec
The test262 reading.
Layer
Grammar & parser. Baked into the SpecTec grammars (spec/spectec/01..07-grammar-*.spectec) and the parser.
Upstream
Checked 2026-11-19: none found (searched for "HTMLCloseComment"). The alternative came with PR #3244 (merged 2024-02, commit 197f1245a), "Normative: Allow Annex B scripts to start with -->", with test262 PR #4002 (merged 2024-02), "Add tests for --> in the first line"; the former changes only §B.1.1.

The program tests/run/erratum_html_close_comment_token.js, verified with ecma-run --annex-b sec-html-like-comments tests/run/erratum_html_close_comment_token.js:

The test262 reading (baked into SpecTec · verified)normal: 1
The literal text (alternative reading)throw: SyntaxError

Cross-engine runs

Source
--> the Script's first input element: an HTMLCloseComment
// A first-line `-->` is an HTMLCloseComment, a comment (Erratum
// HTMLCloseCommentToken, test262's reading).
// args: --annex-b sec-html-like-comments
// expect: normal: 1
1

AnnexBRegExpOrder

SpecTec: test262layer: parser

Write-up 40: Annex B: what §B.1.2's ordered alternatives choose, and which |Pattern| its group-number condition counts →

§B.1.2 Regular Expressions Patterns

When parsing using the following grammar, each alternative is considered only if previous production alternatives do not match.

Formalization note

B.1.2's "each alternative is considered only if previous production alternatives do not match" says neither what an alternative matches nor how nested choices combine, and without an order its grammar is ambiguous (/a{1}/, /\b*/, /\1/). The literal text stops on a pattern with more than one parse. The test262 and proposed reading: commitment: a node of a nonterminal B.1.2 restates uses an alternative only if no earlier alternative of it derives any span from the node's start (tc39/ecma262 #2228; test262's annexB/built-ins/RegExp).

In SpecTec
The test262 reading.
Layer
Grammar & parser. Baked into the SpecTec grammars (spec/spectec/01..07-grammar-*.spectec) and the parser.
Upstream
Checked 2026-11-19: PR #2445 (open, 2021-06), "Editorial: Eliminate order-disambiguation from Annex B Pattern-grammar", replaces the ordering sentence by lookahead restrictions; its ConstrainedDecimalEscape keeps the condition's "the |Pattern| containing |DecimalEscape|"; it is not merged. PR #2228 (merged 2020-12, commit 67dc0c208), "Editorial: Swap 2 alternatives of Term in Annex B", swapped Term's alternatives because, under the ordering sentence, Atom matches wherever Atom Quantifier would.

The program tests/run/erratum_annexb_regexp_order.js, verified with ecma-run --annex-b sec-regular-expressions-patterns tests/run/erratum_annexb_regexp_order.js:

The test262 reading (baked into SpecTec · verified)throw: SyntaxError
The literal text (alternative reading)stop: residue formal-parsetextin#0 2: stops at formal-parsetextin (a helper clause of SpecTec), step 2 (a step of the text with no reading the machine can run)

Cross-engine runs

Source
// B.1.2's alternatives commit in order: `\b*` is an Assertion, which no
// quantifier follows, and the literal has no parse (Erratum AnnexBRegExpOrder,
// test262's reading).
// args: --annex-b sec-regular-expressions-patterns
// expect: throw: SyntaxError
/\b*/;

AnnexBGroupCount

SpecTec: test262layer: parser

Write-up 40: Annex B: what §B.1.2's ordered alternatives choose, and which |Pattern| its group-number condition counts →

§B.1.2 Regular Expressions Patterns, the condition on AtomEscape :: DecimalEscape

[~UnicodeMode] DecimalEscape [> but only if the CapturingGroupNumber of DecimalEscape is ≤ CountLeftCapturingParensWithin(the Pattern containing DecimalEscape)]

Formalization note

B.1.2's condition on AtomEscape :: DecimalEscape, "the CapturingGroupNumber of DecimalEscape is ≤ CountLeftCapturingParensWithin(the Pattern containing DecimalEscape)", reads the Pattern whose parse the condition itself decides. The literal text stops on a pattern with more than one parse. The test262 and proposed reading: stratified: the count is that of a committed parse of the input as Pattern[~UnicodeMode, ~UnicodeSetsMode, ~NamedCaptureGroups] with the condition true (test262's legacy-octal-escape.js).

In SpecTec
The test262 reading.
Layer
Grammar & parser. Baked into the SpecTec grammars (spec/spectec/01..07-grammar-*.spectec) and the parser.
Upstream
Checked 2026-11-19: PR #2445 (open, 2021-06), "Editorial: Eliminate order-disambiguation from Annex B Pattern-grammar", replaces the ordering sentence by lookahead restrictions; its ConstrainedDecimalEscape keeps the condition's "the |Pattern| containing |DecimalEscape|"; it is not merged. PR #2228 (merged 2020-12, commit 67dc0c208), "Editorial: Swap 2 alternatives of Term in Annex B", swapped Term's alternatives because, under the ordering sentence, Atom matches wherever Atom Quantifier would.

The program tests/run/erratum_annexb_group_count.js, verified with ecma-run --annex-b sec-regular-expressions-patterns tests/run/erratum_annexb_group_count.js:

The test262 reading (baked into SpecTec · verified)normal: true
The literal text (alternative reading)stop: residue formal-parsetextin#0 2: stops at formal-parsetextin (a helper clause of SpecTec), step 2 (a step of the text with no reading the machine can run)

Cross-engine runs

Source
// `\1` with one capturing group is a backreference: the group count is read
// from a committed parse (Erratum AnnexBGroupCount, test262's reading).
// args: --annex-b sec-regular-expressions-patterns
// expect: normal: true
/(a)\1/.test("aa");

AnnexBModifierEarlyErrors

SpecTec: test262layer: spec

Write-up 26: Annex B: /(?ii:a)/ has no early error under §B.1.2 →

§22.2.1.1 Static Semantics: Early Errors, the early-error rule of Atom :: `(?` RegularExpressionModifiers `:` Disjunction `)`

It is a Syntax Error if the source text matched by RegularExpressionModifiers contains the same code point more than once.

The test262 and proposed readings

It is a Syntax Error if the source text matched by RegularExpressionModifiers contains the same code point more than once.

§22.2.1.1 Static Semantics: Early Errors, the early-error rule of Atom :: `(?` RegularExpressionModifiers `-` RegularExpressionModifiers `:` Disjunction `)`

It is a Syntax Error if the source text matched by the first RegularExpressionModifiers and the source text matched by the second RegularExpressionModifiers are both empty.

The test262 and proposed readings

It is a Syntax Error if the source text matched by the first RegularExpressionModifiers and the source text matched by the second RegularExpressionModifiers are both empty.

§22.2.1.1 Static Semantics: Early Errors, the early-error rule of Atom :: `(?` RegularExpressionModifiers `-` RegularExpressionModifiers `:` Disjunction `)`

It is a Syntax Error if the source text matched by the first RegularExpressionModifiers contains the same code point more than once.

The test262 and proposed readings

It is a Syntax Error if the source text matched by the first RegularExpressionModifiers contains the same code point more than once.

§22.2.1.1 Static Semantics: Early Errors, the early-error rule of Atom :: `(?` RegularExpressionModifiers `-` RegularExpressionModifiers `:` Disjunction `)`

It is a Syntax Error if the source text matched by the second RegularExpressionModifiers contains the same code point more than once.

The test262 and proposed readings

It is a Syntax Error if the source text matched by the second RegularExpressionModifiers contains the same code point more than once.

§22.2.1.1 Static Semantics: Early Errors, the early-error rule of Atom :: `(?` RegularExpressionModifiers `-` RegularExpressionModifiers `:` Disjunction `)`

It is a Syntax Error if any code point in the source text matched by the first RegularExpressionModifiers is also contained in the source text matched by the second RegularExpressionModifiers.

The test262 and proposed readings

It is a Syntax Error if any code point in the source text matched by the first RegularExpressionModifiers is also contained in the source text matched by the second RegularExpressionModifiers.

Formalization note

§22.2.1.1's modifier rules are on Atom's productions; under B.1.2's grammar (?ii:a) is an ExtendedAtom, for which B.1.2.1 adds no such rule, so literally /(?ii:a)/, /(?-:a)/ and /(?i-i:a)/ are valid patterns without the u or v flag on a B.1.2 host. The test262 and proposed reading: §22.2.1.1's rules of the two modifier productions of Atom apply to the ExtendedAtom productions with the same right-hand sides.

Read as written
The text never stops a run.
In SpecTec
The test262 reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: none found (searched for "RegularExpressionModifiers" and for modifiers with "Annex B"). The modifiers came with PR #3221 (merged 2025-01, commit f55b18095), "Normative: Add RegExp Modifiers", which added the productions to both grammars and their early errors to §22.2.1.1 only.

The program tests/run/erratum_annexb_modifier_early_errors.js, verified with ecma-run --annex-b sec-regular-expressions-patterns tests/run/erratum_annexb_modifier_early_errors.js:

The test262 reading (baked into SpecTec · verified)throw: SyntaxError
The literal text (alternative reading)normal: [object #N]

Cross-engine runs

Source
// §22.2.1.1's modifier rules hold on B.1.2's ExtendedAtom: `(?ii:a)` repeats a
// modifier (Erratum AnnexBModifierEarlyErrors, test262's reading).
// args: --annex-b sec-regular-expressions-patterns
// expect: throw: SyntaxError
/(?ii:a)/;

CoveredNodeParent

SpecTec: test262layer: parser

Write-up 46: A covered Parse Node is outside the tree that covers it →

§5.1.5 The Syntactic Grammar

The sequence of tokens originally matched by p is parsed again using n as the goal symbol.

§15.10.1 Static Semantics: IsInTailPosition, step 2

Let body be the FunctionBody, ConciseBody, or AsyncConciseBody that most closely contains call.

Formalization note

§5.1.5 reparses a cover with n as goal, so the covered node roots a tree of its own: "contained within", "most closely contains" and "the parent of" (such as IsInTailPosition step 2) fail for a node inside it, and read literally return (f(n - 1)) is not a tail call. The test262 and proposed reading: the covered node takes the cover's place in the tree, its parent being the cover's parent (test262's tco-pos.js; docs/spec-issues/46-covered-node-parent.md).

Read as written
The text never stops a run.
In SpecTec
The test262 reading.
Layer
Grammar & parser. Baked into the SpecTec grammars (spec/spectec/01..07-grammar-*.spectec) and the parser.
Upstream
Checked 2026-11-19: none found (searched for "must cover" and "IsInTailPosition"). PR #3223 (open, 2023-11) moves the definition into a new subsection, Cover Productions, with items 2–3 as they are (it makes "covered by" the defined term).

The program tests/run/erratum_covered_node_parent.js, verified with ecma-run tests/run/erratum_covered_node_parent.js:

The test262 reading (baked into SpecTec · verified)normal: 0
The literal text (alternative reading)stop: residue sec-grouping-operator-static-semantics-early-errors#0 ?: stops at §13.2.9.1 Static Semantics: Early Errors (a step of the text with no reading the machine can run)

Cross-engine runs

Source
// Erratum CoveredNodeParent at its test262 reading: the covered
// |ParenthesizedExpression| takes its cover's place, so `return (f(n - 1))` is
// in tail position (test262 tco-pos.js).
// expect: normal: 0
"use strict";
function f(n) {
  if (n === 0) return 0;
  return (f(n - 1));
}
f(3);

NumberMultiplyZeroSign

SpecTec: proposedlayer: spec

Write-up 01: Number::multiply gives +0 for +0 × -5 →

§6.1.6.1.4 Number::multiply, step 6

Return 𝔽(ℝ(x) × ℝ(y)).

The proposed reading
  1. If x is +0𝔽 and y < -0𝔽, return -0𝔽.
  2. If y is +0𝔽 and x < -0𝔽, return -0𝔽.
  3. Return 𝔽(ℝ(x) × ℝ(y)).
In SpecTec
The proposed reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: PR #4072 (open, 2026-11), "Normative: Fix the sign of zero results in Number::multiply", proposes a fix for this case (its description names 0 * -5 and -5 * 0); no issue was found (searched tc39/ecma262's issues and pull requests for "Number::multiply"). PR #2700 (merged 2022-03, commit 4ef927684) added the steps for -0𝔽 operands and left this case.

The program tests/run/number_multiply_zero_sign.js, verified with ecma-run tests/run/number_multiply_zero_sign.js:

The proposed reading (baked into SpecTec · verified)normal: undefined
  • -Infinity,-Infinity,Infinity,-Infinity,Infinity,Infinity,-Infinity
The literal text (alternative reading)normal: undefined
  • Infinity,Infinity,Infinity,-Infinity,Infinity,Infinity,-Infinity

Cross-engine runs

Source
// expect: normal: undefined
// print: -Infinity,-Infinity,Infinity,-Infinity,Infinity,Infinity,-Infinity
// Number::multiply step 6 gives 𝔽(0) = +0 for +0 × -5; the clause's
// description (IEEE 754-2019) and every engine give -0 (Erratum
// NumberMultiplyZeroSign, read by default as proposed: no test262 assertion
// covers the case). A product that underflows keeps
// its sign by 𝔽 itself.
print(String([1 / (0 * -5), 1 / (-5 * 0), 1 / (0 * 5), 1 / (-0 * 5), 1 / (-0 * -5), 1 / (0 * 0),
  1 / (1e-300 * -1e-300)]));

GatherAvailableAncestorsEmptyCycleRoot

SpecTec: literallayer: spec

Write-up 02: GatherAvailableAncestors reads the [[CycleRoot]] of a module whose evaluation threw →

§16.2.1.6.1.3.3 GatherAvailableAncestors, step 1.a

If execList does not contain ancestorModule and ancestorModule.[[CycleRoot]].[[EvaluationError]] is empty, then

The proposed reading
  1. If execList does not contain ancestorModule and ancestorModule.[[EvaluationError]] is empty, then
    1. Assert: ancestorModule.[[Status]] is evaluating-async.
    2. Assert: ancestorModule.[[CycleRoot]] is not empty.
    3. If ancestorModule.[[CycleRoot]].[[EvaluationError]] is empty, then
      1. Assert: ancestorModule.[[AsyncEvaluationOrder]] is an integer.
      2. Assert: ancestorModule.[[PendingAsyncDependencies]] > 0.
      3. Set ancestorModule.[[PendingAsyncDependencies]] to ancestorModule.[[PendingAsyncDependencies]] - 1.
      4. If ancestorModule.[[PendingAsyncDependencies]] = 0, then
        1. Append ancestorModule to execList.
        2. If ancestorModule.[[HasTLA]] is false, perform GatherAvailableAncestors(ancestorModule, execList).
Read as written
A run stops at §16.2.1.6.1.3.3 GatherAvailableAncestors, step 1.a.
In SpecTec
The literal text.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: issue #3766 (open, 2026-03), "m.[[CycleRoot]] can be null in GatherAvailableAncestors", reports it; PR #3769 (open, 2026-03), "Normative: Do not read from empty [[CycleRoot]] in GatherAvailableAncestors", fixes it (step 1.a tests m.[[EvaluationError]] instead of m.[[CycleRoot]].[[EvaluationError]]) and is not merged.

The program tests/run/module_erratum_cycle_root.js, verified with ecma-run --module --module-dir tests/run/modules tests/run/module_erratum_cycle_root.js:

The literal text (baked into SpecTec · verified)stop: sortError sec-gather-available-ancestors#0 1.a: stops at §16.2.1.6.1.3.3 GatherAvailableAncestors, step 1.a (a value of the wrong sort reaches the step)
The proposed reading (alternative reading)throw: Error: c
  • b

Cross-engine runs

Source
// module: yes
// args: --module-dir tests/run/modules
// expect: stop: sortError sec-gather-available-ancestors#0 1.a
// A module whose synchronous evaluation threw has no [[CycleRoot]] (Evaluate
// step 9.a). When its async dependency b finishes, GatherAvailableAncestors
// step 1.a reads a.[[CycleRoot]].[[EvaluationError]], a field of ~empty~: the
// pinned text has no result there (docs/spec-issues/02). No test262 test
// builds this graph, so the defect is kept literal (Erratum
// GatherAvailableAncestorsEmptyCycleRoot) and the run stops, naming it
// (`stop: erratum <Name> <site>`, exit 3: Engine/Cli/Run.lean). The proposed
// reading skips an ancestor whose [[EvaluationError]] is set: b runs to its
// end and c's error is the outcome (`--erratum
// GatherAvailableAncestorsEmptyCycleRoot=proposed`: `throw: Error: c`, then b).
import "./f22_a.mjs";

BuiltinReturnCompletion

SpecTec: test262layer: spec

Write-up 03: A built-in async function's promise fulfils with undefined →

§10.3.3 BuiltinCallOrConstruct, step 10.b.iii

Return Completion(result).

The test262 and proposed readings
  1. If result is a normal completion, return ReturnCompletion(result.[[Value]]).
  2. Return ? result.
In SpecTec
The test262 reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: PR #4074 (open, 2026-11), "Normative: Fix async built-in functions resolving to undefined", reports this (with Array.fromAsync([1, 2, 3])) and proposes a fix; no issue was found (searched for "BuiltinCallOrConstruct"). Step 10, the built-in async path, came with PR #2942 (merged 2025-12, commit 7029ed1b2).

The program tests/run/builtin_async_return.js, verified with ecma-run tests/run/builtin_async_return.js:

The test262 reading (baked into SpecTec · verified)normal: undefined
  • undefined
  • 1,2
The literal text (alternative reading)normal: undefined
  • undefined

Cross-engine runs

Source
// expect: normal: undefined
// print: undefined
// print: 1,2
// BuiltinCallOrConstruct step 10.b.iii under Erratum BuiltinReturnCompletion
// (its test262 reading): "Return array" of Array.fromAsync is a normal
// completion, which the resultsClosure gives to AsyncBlockStart as a return
// completion, so the promise is fulfilled with the array; disposeAsync's
// "Return ? DisposeResources(…)" fulfils it with undefined.
Array.fromAsync([1, 2]).then(function (a) { print(a.join(",")); });
new AsyncDisposableStack().disposeAsync().then(function (v) { print(String(v)); });
void 0;

ExecuteModuleAsyncDisposeResources

SpecTec: test262layer: spec

Write-up 04: A module with top-level await never disposes its top-level resources →

§16.2.1.7.3.2 ExecuteModule, step 4.b

Perform AsyncBlockStart(capability, module.[[ECMAScriptCode]], moduleContext).

The test262 and proposed readings
  1. Let env be module.[[Environment]].
  2. Let asyncBody be a new Abstract Closure with no parameters that captures module and env and performs the following steps when called:
    1. Let result be Completion(Evaluation of module.[[ECMAScriptCode]]).
    2. Set result to Completion(DisposeResources(env.[[DisposableResourceStack]], result)).
    3. Return Completion(result).
  3. Perform AsyncBlockStart(capability, asyncBody, moduleContext).
In SpecTec
The test262 reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: issue #4039 (open, 2026-10), "Disposers are not run for modules with top-level await", reports it; PR #4007 (closed without merging, 2026-10), "Normative: dispose resources during async module evaluation", proposed passing AsyncBlockStart a closure that calls DisposeResources. The declarations using and await using came with PR #3000 (merged 2026-06, commit f792966f2).

The program tests/run/errata_execute_module_dispose.js, verified with ecma-run --module tests/run/errata_execute_module_dispose.js:

The test262 reading (baked into SpecTec · verified)normal: undefined
  • end
  • disposed
The literal text (alternative reading)normal: undefined
  • end

Cross-engine runs

Source
// module: yes
// expect: normal: undefined
// print: end
// print: disposed
// A module with top-level await and `await using` (Erratum ExecuteModuleAsyncDisposeResources):
// the test262 reading disposes the module's resources after its body.
await using x = { [Symbol.asyncDispose]() { print("disposed"); } };
await 0;
print("end");

ParseTextErrorObjects

SpecTec: proposedlayer: spec

Write-up 05: ParseText creates SyntaxError objects without a realm →

§11.1.6 Static Semantics: ParseText, step 5

Return a List of one or more SyntaxError objects representing the parsing errors and/or early errors. If more than one parsing error or early error is present, the number and ordering of error objects in the list is implementation-defined, but at least one must be present.

The proposed reading
  1. Return « a newly created SyntaxError object ».
§22.2.3.4 Static Semantics: ParsePattern, step 1.a

Let parseResult be a List containing one or more SyntaxError objects.

The proposed reading
  1. Let parseResult be « a newly created SyntaxError object ».
§B.1.2.9 Static Semantics: ParsePattern, step 1.a

Let parseResult be a List containing one or more SyntaxError objects.

The proposed reading
  1. Let parseResult be « a newly created SyntaxError object ».

Formalization note

The pinned text says ParseText and ParsePattern return "a List of one or more SyntaxError objects" without specifying a Realm Record, and ten caller steps test "is a List of errors" where the sort "error" is never defined (tc39/ecma262 #3868). SpecTec bakes in three choices: @formal-parsetextin, @ph-syntax-errors and early-error rules allocate a singleton SyntaxError object in currentRealm; Engine/Host/Opts.lean pushes a realm execution context before top-level ParseScript/ParseModule; and @sort-error defines "error" as an Object with [[ErrorData]] (write-up 05).

In SpecTec
The proposed reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: none found that reports it (searched for "ParseText" with realm and with SyntaxError). Issue #3868 (open, 2026-05), "How should ParseText results be consumed?", asks how callers test the result, not where its objects are created; issue #1462 (open, 2019-03), "Current Realm record when creating new objects in [[Construct]]", asks the same realm question of the objects [[Construct]] creates. ParseText's NOTE, now step 3, came with PR #3956 (merged 2026-10, commit 21e4774e4).

The program tests/run/errata_parsetext_error_objects.js, verified with ecma-run tests/run/errata_parsetext_error_objects.js:

The proposed reading (baked into SpecTec · verified)normal: "true,true,true,NaN"
The literal text (alternative reading)stop: residue sort-error#0 1: stops at sort-error (a helper clause of SpecTec), step 1 (a step of the text with no reading the machine can run)

Cross-engine runs

Source
// expect: normal: "true,true,true,NaN"
let r = [];
try { eval("var x = ;"); } catch (e) { r.push(e instanceof SyntaxError); }
try { Function("a", "return a +;"); } catch (e) { r.push(e instanceof SyntaxError); }
try { new RegExp("("); } catch (e) { r.push(e instanceof SyntaxError); }
r.push(+"not-a-number");
r.join(",");

DoWaitSyncTimeout

SpecTec: test262layer: spec

Write-up 06: A synchronous Atomics.wait that times out returns "ok" →

§25.4.3.14 DoWait, step 28.a

Perform SuspendThisAgent(waiterList, waiterRecord).

The test262 reading
  1. Perform SuspendThisAgent(waiterList, waiterRecord).
  2. If waiterList.[[Waiters]] contains waiterRecord, then
    1. Set waiterRecord.[[Result]] to "timed-out".
    2. Perform RemoveWaiter(waiterList, waiterRecord).
The proposed reading
  1. Perform SuspendThisAgent(waiterList, waiterRecord).
  2. If waiterList.[[Waiters]] contains waiterRecord, then
    1. NOTE: The agent woke because of the timeout: NotifyWaiter is performed only on a Waiter Record that RemoveWaiters has removed.
    2. Set waiterRecord.[[Result]] to "timed-out".
    3. Perform RemoveWaiter(waiterList, waiterRecord).
Read as written
A run stops at §25.4.3.8 AddWaiter, step 2.
In SpecTec
The test262 reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: none found (searched for "DoWait"). Issue #3328 (open, 2024-05), "Typo in step 7 of the SuspendThisAgent abstract operation", is about another error in SuspendThisAgent step 7.

The program tests/run/atomics_wait_sync_timeout.js, verified with ecma-run --can-block tests/run/atomics_wait_sync_timeout.js:

The test262 reading (baked into SpecTec · verified)normal: undefined
  • timed-out,timed-out,true,true,0 ; not-equal
The literal text (alternative reading)stop: assertFailed sec-addwaiter#0 2: stops at §25.4.3.8 AddWaiter, step 2 (a failed Assert)

Cross-engine runs

Source
// Atomics.wait on an agent that can block (§25.4.3.14, SuspendThisAgent
// §25.4.3.11): with one agent nothing notifies the waiter, so it wakes when
// the host's clock reaches its timeout time. Erratum DoWaitSyncTimeout: the
// woken waiter's [[Result]] is "timed-out" and it leaves the WaiterList, so a
// second wait on the same location does not fail AddWaiter step 2's Assert
// and a later Atomics.notify finds no waiter.
// args: --can-block
// expect: normal: undefined
// print: timed-out,timed-out,true,true,0 ; not-equal
var i32 = new Int32Array(new SharedArrayBuffer(8));
var t0 = Date.now();
var first = Atomics.wait(i32, 0, 0, 10);
var t1 = Date.now();
var second = Atomics.wait(i32, 0, 0, 5);
var t2 = Date.now();
var notified = Atomics.notify(i32, 0);
Atomics.store(i32, 1, 3);
print([first, second, t1 - t0 >= 10, t2 - t1 >= 5, notified].join() + " ; " + Atomics.wait(i32, 1, 0, 10));
void 0;

AtomicsWaitAsyncTimeoutAssert

SpecTec: literallayer: spec

Write-up 09: EnqueueAtomicsWaitAsyncTimeoutJob passes a negative delay, and its Assert can fail →

§25.4.3.15 EnqueueAtomicsWaitAsyncTimeoutJob, step 1.b.ii

Assert: ℝ(timeOfJobExecution) ≥ waiterRecord.[[TimeoutTime]] (ignoring potential non-monotonicity of time values).

The proposed reading
  1. Assert: timeOfJobExecution ≥ 𝔽(waiterRecord.[[TimeoutTime]]) rounded down to an integral Number (ignoring potential non-monotonicity of time values).
Read as written
A run stops at §25.4.3.15 EnqueueAtomicsWaitAsyncTimeoutJob, step 1.b.ii.
In SpecTec
The literal text.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: none found (searched for "EnqueueAtomicsWaitAsyncTimeoutJob", whose one hit renames aliases, and "HostEnqueueTimeoutJob"). The operation came with PR #3049 (merged 2023-06, commit 3330e231b), "Normative: Add Atomics.waitAsync".

Example (Script): docs/spec-issues/examples/09-atomics-waitasync-timeout-assert.js

Cross-engine runs

Source examples/09-atomics-waitasync-timeout-assert.js
// EnqueueAtomicsWaitAsyncTimeoutJob 1.b.ii: "Assert: ℝ(timeOfJobExecution) ≥
// waiterRecord.[[TimeoutTime]]". With a fractional timeout and
// additionalTimeout 0, [[TimeoutTime]] is not a time value; a host whose clock
// has millisecond resolution may run the Job (after "at least" the step 4
// delay) at a time below it.
if (typeof print === "undefined") globalThis.print = console.log;
var ia = new Int32Array(new SharedArrayBuffer(8));
var t0 = Date.now();
var r = Atomics.waitAsync(ia, 0, 0, 0.7);
print(r.async);
r.value.then(function (v) { print(v + ", elapsed ≥ 0: " + (Date.now() - t0 >= 0)); });
// (node ends the process when only an Atomics.waitAsync timeout is pending)
if (typeof setTimeout === "function") setTimeout(function () {}, 50);

AtomicsWaitAsyncTimeoutNegativeDelay

SpecTec: literallayer: spec

Write-up 09: EnqueueAtomicsWaitAsyncTimeoutJob passes a negative delay, and its Assert can fail →

§25.4.3.15 EnqueueAtomicsWaitAsyncTimeoutJob, step 4

Perform HostEnqueueTimeoutJob(timeoutJob, currentRealm, 𝔽(waiterRecord.[[TimeoutTime]]) - now).

The proposed reading
  1. Let delay be 𝔽(waiterRecord.[[TimeoutTime]]) - now.
  2. If delay < +0𝔽, set delay to +0𝔽.
  3. Perform HostEnqueueTimeoutJob(timeoutJob, currentRealm, delay).

Formalization note

now is read after DoWait's reading from which [[TimeoutTime]] was computed, so the literal difference is negative when the clock has advanced past [[TimeoutTime]], and HostEnqueueTimeoutJob takes a non-negative finite Number. The proposed reading clamps the text's own difference at zero, so that now + delay is 𝔽([[TimeoutTime]]) whenever the delay is positive: the Job runs no earlier than that time value, which is what AtomicsWaitAsyncTimeoutAssert's proposed Assert needs. Clamping the exact difference instead (𝔽(max([[TimeoutTime]] - ℝ(now), 0))) can round the delay down across a millisecond that 𝔽([[TimeoutTime]]) rounds up to.

While SpecTec keeps the literal subtraction at EnqueueAtomicsWaitAsyncTimeoutJob step 4, runtime parameter-sort checks are omitted and Engine.Host.Strategy.msCeil clamps negative timeout delays up to 0 ms (and wakeFinite in 16-host-laws-jobs.spectec caps finite agent suspension timeouts at maxTime = 8.64 × 10^15 ms).

Read as written
A run stops at §25.4.3.15 EnqueueAtomicsWaitAsyncTimeoutJob, step 4.
In SpecTec
The literal text.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: none found (searched for "EnqueueAtomicsWaitAsyncTimeoutJob", whose one hit renames aliases, and "HostEnqueueTimeoutJob"). The operation came with PR #3049 (merged 2023-06, commit 3330e231b), "Normative: Add Atomics.waitAsync".

Example (Script): docs/spec-issues/examples/09-atomics-waitasync-timeout-assert.js

Cross-engine runs

Source examples/09-atomics-waitasync-timeout-assert.js
// EnqueueAtomicsWaitAsyncTimeoutJob 1.b.ii: "Assert: ℝ(timeOfJobExecution) ≥
// waiterRecord.[[TimeoutTime]]". With a fractional timeout and
// additionalTimeout 0, [[TimeoutTime]] is not a time value; a host whose clock
// has millisecond resolution may run the Job (after "at least" the step 4
// delay) at a time below it.
if (typeof print === "undefined") globalThis.print = console.log;
var ia = new Int32Array(new SharedArrayBuffer(8));
var t0 = Date.now();
var r = Atomics.waitAsync(ia, 0, 0, 0.7);
print(r.async);
r.value.then(function (v) { print(v + ", elapsed ≥ 0: " + (Date.now() - t0 >= 0)); });
// (node ends the process when only an Atomics.waitAsync timeout is pending)
if (typeof setTimeout === "function") setTimeout(function () {}, 50);

GetUTCEpochNanosecondsNaN

SpecTec: literallayer: spec

Write-up 10: new Date(0).setHours(1e21): UTC ( t ) reaches a failing Assert →

§21.4.1.26 UTC, step 1

If t is not a finite Number, return NaN.

The proposed reading
  1. If t is not a finite Number, return NaN.
  2. If MakeDay(𝔽(YearFromTime(t)), 𝔽(MonthFromTime(t)), 1𝔽) is NaN, return NaN.

Formalization note

Alongside keeping UTC step 1 literal here, SpecTec bakes in MakeDayFiniteTimeValue on MakeDay step 8 and omits runtime return-sort checks (so GetUTCEpochNanoseconds exceeding MinEpochNanoseconds..MaxEpochNanoseconds on large UTC(t) inputs does not stop with sortError; docs/spec-issues/10-utc-large-local-time.md).

Read as written
A run stops at §21.4.1.18 GetUTCEpochNanoseconds, step 4.
In SpecTec
The literal text.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: PR #3464 (open, 2024-10), "Editorial: Add "local-offset time value" for time values with local time zone offset applied", has a commit, "Editorial: Handle too large inputs early in UTC" (e8051bb98), that adds to UTC the range check proposed here; it is not merged. Related, open: issue #1087 (open, 2018-02), "MakeDay should be more explicit how unreasonably large numbers are handled"; issue #3992 (open, 2026-10), "DayWithinYear AO can return -1 due to floating point errors", on new Date(2000, 0, 106752348147); issue #4086 (open, 2026-11), "Argument type of UTC and TimeString should be integral Number", which says #3464 addresses the range; PR #3995 (open, 2026-10), "Editorial: relax/restrict some Date AO types appropriately", which makes UTC's step 1 "If t is NaN" and adds no range check.

The program tests/run/date_utc_large_local_time.js, verified with ecma-run tests/run/date_utc_large_local_time.js:

The literal text (baked into SpecTec · verified)stop: assertFailed sec-getutcepochnanoseconds#0 4: stops at §21.4.1.18 GetUTCEpochNanoseconds, step 4 (a failed Assert)
The proposed reading (alternative reading)normal: undefined
  • NaN
  • NaN

Cross-engine runs

Source
// expect: stop: assertFailed sec-getutcepochnanoseconds#0 4
// UTC ( t ) of a large finite local time: setHours(1e21) gives t = 3.6e24,
// GetUTCEpochNanoseconds step 1's MakeDay finds no time value on the month's
// first day (NaN), and the Assert of its step 4 fails. No test262 test
// reaches it, and the default reading is the text as written (Erratum
// GetUTCEpochNanosecondsNaN), so the run stops.
// Engines give NaN. The UTC setter does not call UTC ( t ): NaN.
print(String(new Date(0).setUTCHours(1e21)));
print(String(new Date(0).setHours(1e21)));

MakeDayFiniteTimeValue

SpecTec: proposedlayer: spec

Write-up 10: new Date(0).setHours(1e21): UTC ( t ) reaches a failing Assert →

§21.4.1.28 MakeDay, step 8

Find a finite time value tv such that YearFromTime(tv) = ℝ(balancedYear), MonthFromTime(tv) = balancedMonthMV, and DateFromTime(tv) = 1; but if this is not possible (because some argument is out of range), return NaN.

Formalization note

§21.4.1.1 defines a finite time value first as an integral Number and then states a ±8.64 × 1015 ms range. On Date.UTC(275761, 0, -256), 1 January 275761 exceeds 8.64 × 1015 ms while the resulting date is in range; SpecTec (@sec-makeday and @sort-time-value) bakes in reading "finite time value" as any finite integral Number, matching V8, SpiderMonkey and JavaScriptCore (write-up 10).

In SpecTec
The proposed reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: PR #3464 (open, 2024-10), "Editorial: Add "local-offset time value" for time values with local time zone offset applied", has a commit, "Editorial: Handle too large inputs early in UTC" (e8051bb98), that adds to UTC the range check proposed here; it is not merged. Related, open: issue #1087 (open, 2018-02), "MakeDay should be more explicit how unreasonably large numbers are handled"; issue #3992 (open, 2026-10), "DayWithinYear AO can return -1 due to floating point errors", on new Date(2000, 0, 106752348147); issue #4086 (open, 2026-11), "Argument type of UTC and TimeString should be integral Number", which says #3464 addresses the range; PR #3995 (open, 2026-10), "Editorial: relax/restrict some Date AO types appropriately", which makes UTC's step 1 "If t is NaN" and adds no range check.

The program tests/run/errata_makeday_finite_time_value.js, verified with ecma-run tests/run/errata_makeday_finite_time_value.js:

The proposed reading (baked into SpecTec · verified)normal: "8639987299200000,8640000000000000"
The literal text (alternative reading)normal: "NaN,8640000000000000"

Cross-engine runs

Source
// expect: normal: "8639987299200000,8640000000000000"
[Date.UTC(275761, 0, -256), Date.UTC(275760, 8, 13)].join(",");

GetMatchStringStartAfterEnd

SpecTec: literallayer: spec

Write-up 11: /u with lastIndex inside a surrogate pair: a match reported one code unit late, and a Match Record that ends before it starts →

§22.2.7.2 RegExpBuiltinExec, step 13.b

Let inputIndex be the index into input of the character that was obtained from element lastIndex of string.

The proposed reading
  1. Let inputIndex be the index into input of the character that was obtained from element lastIndex of string.
  2. If fullUnicode is true, set lastIndex to GetStringIndex(string, inputIndex).

Formalization note

While GetMatchString step 1's Assert is kept literal, @ph-input-index-of (Helpers.spectec) bakes in mapping a trailing-surrogate lastIndex backward to the containing surrogate pair's code-point index at RegExpBuiltinExec step 13.b (and returning $ListLen(input) at lastIndex = length, see RegExpExecEndOfString). Consequently /(?:)/gu stops at GetMatchString step 1 while /./gu at lastIndex = 1 on "\u{1F600}" returns the lone trailing surrogate "\uDE00" (write-up 11).

Read as written
A run stops at §22.2.7.6 GetMatchString, step 1, when called from §22.2.7.2 RegExpBuiltinExec.
In SpecTec
The literal text.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: issue #128 (open, 2015-10), "Unicode RegExp with index points trail surrogate in surrogate pair is not covered in the spec", and issue #2511 (open, 2021-09), "Underspecified behavior of global unicode regular expressions with lastIndex inside a surrogate pair", ask what the index of step 13.b means inside a pair; on #2511 (2021-09-11) the author of that step's wording answered that it refers to the code point of the pair, and #2511 was called a duplicate of #128.

The program tests/run/regexp_lastindex_inside_pair.js, verified with ecma-run tests/run/regexp_lastindex_inside_pair.js:

The literal text (baked into SpecTec · verified)stop: assertFailed sec-getmatchstring#0 1: stops at §22.2.7.6 GetMatchString, step 1 (a failed Assert)
The proposed reading (alternative reading)normal: [object #N]

Cross-engine runs

Source
// expect: stop: assertFailed sec-getmatchstring#0 1
// RegExpBuiltinExec with /u and lastIndex on the trailing surrogate of a pair:
// step 13.b starts at the code point that contains it, the empty pattern
// matches there with [[EndIndex]] 0, and step 24's Match Record { 1, 0 } fails
// GetMatchString step 1's Assert. No test262 test sets lastIndex inside a
// pair before an empty match; the default reading is the text as written
// (Erratum GetMatchStringStartAfterEnd), so the run stops.
// V8 and SpiderMonkey report index 0; JavaScriptCore reports index 1.
// (The non-empty case, which does not stop, is
// regexp_lastindex_inside_pair_nonempty.js.)
var r = /(?:)/gu;
r.lastIndex = 1;
r.exec("\u{1F600}");

AsyncBlockStartAwaitResult

SpecTec: test262layer: spec

Write-up 12: AsyncBlockStart asserts unused, but Await resumes it with empty →

§27.10.5.2 AsyncBlockStart, step 4

Assert: result is unused.

The test262 and proposed readings
  1. Assert: result is either unused or empty.
Read as written
A run stops at §27.10.5.2 AsyncBlockStart, step 4.
In SpecTec
The test262 reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: issue #3435 (open, 2024-10), "editorial: mismatch between Await transfer-of-control and AsyncBlockStart", reports it, against the text before RunCallerContext; it has no comments. RunCallerContext came with PR #3846 (merged 2026-06, commit 45a667175). PR #4018 (closed without merging, 2026-10), "Editorial: align async block assertions with Await suspension", proposed letting the Assert accept empty. PR #3604 (open, 2025-05) rewords step 1.d only.

The program tests/dbg/async.js, verified with ecma-run tests/dbg/async.js:

The test262 reading (baked into SpecTec · verified)normal: [object #N]
  • 2
The literal text (alternative reading)stop: assertFailed sec-asyncblockstart#0 4: stops at §27.10.5.2 AsyncBlockStart, step 4 (a failed Assert)

Cross-engine runs

Source
async function h() {
  var a = 1;
  await a;
  a = a + 1;
  return a;
}
var p = h();
p.then(function (v) { print(v); });
var z = 3;

PromiseJobAbruptCompletion

SpecTec: literallayer: spec

Write-up 13: NewPromiseReactionJob can return a throw completion, and null-realm promise Jobs run user code without a specified agent or realm →

§27.5.2.1 NewPromiseReactionJob, step 1.h

If handlerResult is an abrupt completion, then

The proposed reading
  1. If handlerResult is an abrupt completion, then
    1. Let settleResult be Completion(Call(promiseCapability.[[Reject]], undefined, « handlerResult.[[Value]] »)).
  2. Else,
    1. Let settleResult be Completion(Call(promiseCapability.[[Resolve]], undefined, « handlerResult.[[Value]] »)).
§27.5.2.1 NewPromiseReactionJob, step 1.i

Return ? Call(promiseCapability.[[Resolve]], undefined, « handlerResult.[[Value]] »).

The proposed reading
  1. If settleResult is an abrupt completion, perform HostReportErrors(« settleResult.[[Value]] »).
  2. Return empty.

Formalization note

In addition to checking NewPromiseReactionJob's completion at the job boundary, SpecTec's host laws assign null-realm promise Jobs to the surrounding agent with per-agent FIFO order, and Engine.Host.prepareJobOn pushes an execution context for the agent's realm so species resolving functions have a running execution context (write-up 13).

Read as written
A run stops at §9.5 Jobs and Host Operations to Enqueue Jobs, the job loop's check of a Job's abrupt completion (§9.5), when called from §27.5.2.1 NewPromiseReactionJob.
In SpecTec
The literal text.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: none found (searched for "NewPromiseReactionJob" and "HostEnqueuePromiseJob"). PR #2772 (open, a draft, 2022-05), "Remove Job from Promise Resolve Functions", is about the resolving functions' own Job; issue #2222 (open, 2020-11), "Promise.prototype.finally should use onFinally's realm for newly creating functions", is about finally's functions; PR #1597 (merged 2020-03, commit c59502090) and PR #1984 (merged 2020-08, commit a59a820d3) introduced the null realm for handler-less reactions and §9.5.5's note.

The program tests/run/promise_job_abrupt.js, verified with ecma-run tests/run/promise_job_abrupt.js:

The literal text (baked into SpecTec · verified)stop: assertFailed sec-jobs -: stops at §9.5 Jobs and Host Operations to Enqueue Jobs, the job loop's check of a Job's completion (a failed Assert)
The proposed reading (alternative reading)normal: [object #N]
  • handler 1
  • a later Job

Cross-engine runs

Source
// expect: stop: assertFailed sec-jobs -
// NewPromiseReactionJob 1.i returns `? Call(promiseCapability.[[Resolve]], …)`;
// with a species constructor whose resolve throws, the Job returns a throw
// completion, which §9.5 says a Job must not. No test262 test makes a
// reaction Job's resolving function throw; the default reading is the text
// as written (Erratum PromiseJobAbruptCompletion), so the run
// stops. (Engine hosts differ: node goes on silently; the SpiderMonkey shell
// and Bun, with JavaScriptCore, report the throw and go on.)
function Bad(executor) {
  executor(function () { throw new Error("boom"); }, function () {});
}
Bad[Symbol.species] = Bad;
var p = Promise.resolve(1);
p.constructor = Bad;
p.then(function (v) { print("handler " + v); return v; });
Promise.resolve(3).then(function () { print("a later Job"); });

NativeFunctionInitialName

SpecTec: literallayer: spec

Write-up 14: Function.prototype.toString has no conforming result for some [[InitialName]] values →

§20.2.3.5 Function.prototype.toString, step 3

If func is a built-in function object, return an implementation-defined String source code representation of func. The representation must have the syntax of a NativeFunction. Additionally, if func has an [[InitialName]] internal slot and func.[[InitialName]] is a String, the portion of the returned String that would be matched by NativeFunctionAccessor? PropertyName must be func.[[InitialName]].

The proposed reading
  1. If func is a built-in function object, return NativeFunctionSource(func).

Formalization note

The proposed text: "If func is a built-in function object, return an implementation-defined String source code representation of func. The representation must have the syntax of a NativeFunction. Additionally, if func has an [[InitialName]] internal slot, func.[[InitialName]] is a String, and func.[[InitialName]] is matched by NativeFunctionAccessor? PropertyName, the portion of the returned String that would be matched by NativeFunctionAccessor? PropertyName must be func.[[InitialName]]." Both requirements are NativeFunctionSource's law.

While non-PropertyName [[InitialName]] strings such as "a b" have no conforming output and stop on residue when source text is unavailable, S20.spectec bakes in allowing an empty "" [[InitialName]] without a PropertyName Parse Node (for anonymous built-ins), and NativeFunctionSource restricts .ok representations to ASCII names (write-up 14).

Read as written
The text never stops a run.
In SpecTec
The literal text.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: related: PR #2695 (open, 2022-03), "Normative: Allow toString of a built-in function to output a computed property name", adds a [ StringLiteral ] form of NativeFunctionName, which every String can take; a comment there (2022-08-04) says that per the July 2022 meeting it should be replaced by tc39/proposal-stricter-function-tostring (stage 0 by its README, last pushed 2022-07).

Example (Script): docs/spec-issues/examples/14-nativefunction-initialname.js

Cross-engine runs

Source examples/14-nativefunction-initialname.js
// Function.prototype.toString step 3: for a built-in function whose
// [[InitialName]] no PropertyName matches, no String has "the syntax of a
// NativeFunction" with that name as its PropertyName portion. A class's
// default constructor is a built-in function (ClassDefinitionEvaluation
// 14.b) named by NamedEvaluation; on a host whose HostHasSourceTextAvailable
// is false, step 3 applies to it.
if (typeof print === "undefined") globalThis.print = console.log;
var o = { ["a b"]: class {} };
print(JSON.stringify(o["a b"].name));
class C { static #x = class {}; static name2() { return C.#x.name; } }
print(JSON.stringify(C.name2()));
var s = { [Symbol("a b")]: class {} };
print(JSON.stringify(s[Object.getOwnPropertySymbols(s)[0]].name));
// With source text available (every engine), step 2 returns the class text:
print(Function.prototype.toString.call(o["a b"]));

SyntheticModuleLinkResets

SpecTec: literallayer: spec

Write-up 15: A second Link of a Synthetic Module Record resets its exports, observably with JSON modules →

§16.2.1.8.4.4 Link, step 1

Let realm be module.[[Realm]].

The proposed reading
  1. If module.[[Environment]] is not empty, return unused.
  2. Let realm be module.[[Realm]].
Read as written
The text never stops a run.
In SpecTec
The literal text.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: issue #3989 (open, 2026-09), "Bug: Link() and Evaluate() on synthetic module records should be idempotent", reports it for Link and Evaluate and says it is "not observable on the web because both JSON modules and CSS modules are pre-evaluated"; it has no comments, and no pull request was found.

The program tests/run/module_json_relink.js, verified with ecma-run --module --module-dir tests/run/modules tests/run/module_json_relink.js:

The literal text (baked into SpecTec · verified)normal: undefined
  • main sees 1
  • probe sees undefined
  • after other: 1
The proposed reading (alternative reading)normal: undefined
  • main sees 1
  • probe sees 1
  • after other: 1

Cross-engine runs

Source
// module: yes
// args: --module-dir tests/run/modules
// expect: normal: undefined
// print: main sees 1
// print: probe sees undefined
// print: after other: 1
// Link of a Synthetic Module Record (§16.2.1.8.4.4) runs for every importer
// that is linked (InnerModuleLinking 1.a) and gives the module a new
// environment whose bindings are undefined until it is evaluated again. The
// second importer (modules/relink_other.mjs) imports modules/relink_probe.mjs
// before the JSON module, so the probe runs between the second Link and the
// second evaluation and reads undefined through this module's import. Kept
// literal (Erratum SyntheticModuleLinkResets, docs/spec-issues/15): no
// test262 test evaluates a module in between. Engines print 1.
import j from "./relink.json" with { type: "json" };
export function readJ() { return j; }
print("main sees " + j.a);
import("./relink_other.mjs").then(function () { print("after other: " + j.a); },
  function (e) { print("rejected " + e); });

CreateDynamicFunctionPrivateIdentifiers

SpecTec: proposedlayer: spec

Write-up 20: new Function("o", "return o.#f"): no check of private names in dynamic functions →

§20.2.1.1.1 CreateDynamicFunction, step 25

If expr is a List of errors, throw a SyntaxError exception.

The test262 reading
  1. If expr is a List of errors, throw a SyntaxError exception.
  2. If AllPrivateIdentifiersValid of body with argument « » is false, throw a SyntaxError exception.
The proposed reading
  1. If expr is a List of errors, throw a SyntaxError exception.
  2. If AllPrivateIdentifiersValid of body with argument « » is false, throw a SyntaxError exception.
  3. If AllPrivateIdentifiersValid of params with argument « » is false, throw a SyntaxError exception.
In SpecTec
The proposed reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: none found (searched for "CreateDynamicFunction" with private, no hits, and "AllPrivateIdentifiersValid"). PR #1668 (merged 2021-05), which brought private names into the specification, has no check of them in CreateDynamicFunction. Issue #3080 (closed, 2023-05), "MakePrivateReference and ResolvePrivateIdentifier assert that outer private environment can't be null", asked why MakePrivateReference asserts a non-null PrivateEnvironment; the answer there points to AllPrivateIdentifiersValid's early errors, which are rules of Scripts, Modules and direct eval.

The program tests/run/dynamic_function_private_identifiers.js, verified with ecma-run tests/run/dynamic_function_private_identifiers.js:

The proposed reading (baked into SpecTec · verified)normal: undefined
  • body: SyntaxError
  • params: SyntaxError
  • generator body: SyntaxError
The test262 reading (alternative reading)normal: undefined
  • body: SyntaxError
  • params: no error
  • generator body: SyntaxError
The literal text (alternative reading)normal: undefined
  • body: no error
  • params: no error
  • generator body: no error

Cross-engine runs

Source
// expect: normal: undefined
// print: body: SyntaxError
// print: params: SyntaxError
// print: generator body: SyntaxError
// CreateDynamicFunction steps 18-29: no goal it parses with applies
// AllPrivateIdentifiersValid (Erratum CreateDynamicFunctionPrivateIdentifiers).
// The default reading, the proposed one, adds after step 25
// "If AllPrivateIdentifiersValid of _body_ with argument « » is false, throw a
// SyntaxError exception" and the same of _params_ (spec/DECISIONS.md):
// engines parse the parameters and the body as one source text and throw for
// both. The test262 reading checks the body only, which is all test262's
// built-ins/Function/private-identifiers-not-empty.js asserts
// (dynamic_function_private_identifiers_test262.js); the literal text checks
// neither (dynamic_function_private_identifiers_literal.js).
try { new Function("o", "return o.#f"); print("body: no error"); }
catch (e) { print("body: " + e.constructor.name); }
try { new Function("a = {}.#g", ""); print("params: no error"); }
catch (e) { print("params: " + e.constructor.name); }
var GeneratorFunction = Object.getPrototypeOf(function* () {}).constructor;
try { GeneratorFunction("o", "yield o.#h"); print("generator body: no error"); }
catch (e) { print("generator body: " + e.constructor.name); }

LonePropertyGeneralCategoryAssert

SpecTec: test262layer: spec

Write-up 24: CompileToCharSet asks UnicodeMatchPropertyValue for a General_Category value before testing that it is one →

§22.2.2.9 Runtime Semantics: CompileToCharSet, step 2

If UnicodeMatchPropertyValue(General_Category, s) is a Unicode property value or property value alias for the General_Category (gc) property listed in PropertyValueAliases.txt, then

The test262 and proposed readings
  1. If s is a Unicode property value or property value alias for the General_Category (gc) property listed in PropertyValueAliases.txt, then
    1. Let v be UnicodeMatchPropertyValue(StringToCodePoints("General_Category"), s).
    2. Return the CharSet containing all Unicode code points whose character database definition includes the property “General_Category” with value v.
Read as written
A run stops at §22.2.2.9.8 UnicodeMatchPropertyValue, step 2, when called from §22.2.2.9 Runtime Semantics: CompileToCharSet.
In SpecTec
The test262 reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: issue #3586 (open, 2025-05), "UnicodeMatchPropertyValue assertion fails by UnicodePropertyValueExpression", reports it for /[\p{Hex}]/u; PR #3587 (open, 2025-05), "Editorial: Fix incorrect use of UnicodeMatchPropertyValue", fixes it by testing s first, with other changes (Script_Extensions), and is not merged.

The program tests/run/errata_lone_property_gc.js, verified with ecma-run tests/run/errata_lone_property_gc.js:

The test262 reading (baked into SpecTec · verified)normal: "true,true,true,true"
The literal text (alternative reading)stop: assertFailed sec-runtime-semantics-unicodematchpropertyvalue-p-v#0 2: stops at §22.2.2.9.8 UnicodeMatchPropertyValue, step 2 (a failed Assert)

Cross-engine runs

Source
// expect: normal: "true,true,true,true"
[/\p{Lu}/u.test("A"), /\p{ASCII}/u.test("a"), /\p{Hex}/u.test("f"), /\p{Any}/u.test("\u{10FFFF}")].join(",");

PropNameCoverInitializedName

SpecTec: proposedlayer: spec

Write-up 29: ({a = 1});: the __proto__ early error asks for the PropName of a CoverInitializedName, which has none →

§13.2.5.1 Static Semantics: Early Errors, the duplicate __proto__ rule

It is a Syntax Error if the PropertyNameList of PropertyDefinitionList contains any duplicate entries for "__proto__" and at least two of those entries were obtained from productions of the form

§13.2.5.4 Static Semantics: PropertyNameList, step 1

Let propertyName be the PropName of PropertyDefinition.

Formalization note

ObjectLiteral's duplicate-__proto__ early-error rule calls PropertyNameList -> PropName on every PropertyDefinition, including CoverInitializedName (({a = 1})), which has no PropName row in §8.6.5. SpecTec bakes in @row-propname-coverinitializedname, @formal-protopropertycount, and bottom-up child early-error short-circuiting so evaluation never stops with sortError (write-up 29).

In SpecTec
The proposed reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: none found (searched for "CoverInitializedName" and "PropName"). Issue #2607 (open, 2022-01), "Editorial: missing syntax error (involving CoverCallExpressionAndAsyncArrowHead)", is about another case of the CoverInitializedName rule, f({x = 0}).

The program tests/run/errata_propname_coverinitializedname.js, verified with ecma-run tests/run/errata_propname_coverinitializedname.js:

The proposed reading (baked into SpecTec · verified)normal: "SyntaxError,SyntaxError,ok"
The literal text (alternative reading)stop: sortError sec-static-semantics-propertynamelist#0 1: stops at §13.2.5.4 Static Semantics: PropertyNameList, step 1 (a value of the wrong sort reaches the step)

Cross-engine runs

Source
// expect: normal: "SyntaxError,SyntaxError,ok"
let out = [];
for (const s of ["({a = 1});", "({__proto__: 1, __proto__ = 2});", "({a = 1} = {});"]) {
  try { (0, eval)(s); out.push("ok"); } catch (e) { out.push(e.name); }
}
out.join(",");

AllocateSharedArrayBufferByteLengthStore

SpecTec: test262layer: spec

Write-up 43: AllocateSharedArrayBuffer stores a growable buffer's length with SetValueInBuffer on a Shared Data Block →

§25.2.2.1 AllocateSharedArrayBuffer, step 9.c

Perform SetValueInBuffer(byteLengthBlock, 0, biguint64, ℤ(byteLength), true, seq-cst).

The test262 and proposed readings
  1. Let agentRecord be the Agent Record of the surrounding agent.
  2. Let rawBytes be NumericToRawBytes(biguint64, ℤ(byteLength), agentRecord.[[LittleEndian]]).
  3. Let execution be agentRecord.[[CandidateExecution]].
  4. Let eventsRecord be the Agent Events Record of execution.[[EventsRecords]] whose [[AgentSignifier]] is AgentSignifier().
  5. Append WriteSharedMemory { [[Order]]: seq-cst, [[NoTear]]: true, [[Block]]: byteLengthBlock, [[ByteIndex]]: 0, [[ElementSize]]: 8, [[Payload]]: rawBytes } to eventsRecord.[[EventList]].

Formalization note

SetValueInBuffer takes an ArrayBuffer or SharedArrayBuffer (its step 4 reads [[ArrayBufferData]]); byteLengthBlock is a Shared Data Block, which ArrayBufferByteLength and SharedArrayBuffer.prototype.grow read with GetRawBytesFromSharedBlock. The reading writes it as SetValueInBuffer's shared branch would (IsNoTearConfiguration(biguint64, seq-cst) is true). test262 constructs growable SharedArrayBuffers (built-ins/SharedArrayBuffer/prototype/grow).

In SpecTec
The test262 reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: PR #4023 (closed without merging, 2026-10), "Editorial: initialize shared byte-length data with a memory event", proposed replacing the SetValueInBuffer call by a WriteSharedMemory event; no issue was found (searched for "AllocateSharedArrayBuffer"). The step came with PR #3116 (merged 2023-10, commit a9ae96eda); PR #3976 (open, 2026-09), "Editorial: Use "Internal Slots" tables for more object types", leaves it as it is.

The program tests/run/errata_allocate_sab_byte_length.js, verified with ecma-run tests/run/errata_allocate_sab_byte_length.js:

The test262 reading (baked into SpecTec · verified)normal: 2
The literal text (alternative reading)stop: sortError sec-setvalueinbuffer#0 4: stops at §25.1.3.18 SetValueInBuffer, step 4 (a value of the wrong sort reaches the step)

Cross-engine runs

Source
// expect: normal: 2
// A growable SharedArrayBuffer (Erratum AllocateSharedArrayBufferByteLengthStore): the
// test262 reading stores the byte length in its Shared Data Block, which grow reads.
var b = new SharedArrayBuffer(1, { maxByteLength: 4 });
b.grow(2);
b.byteLength;

ContainsAwaitCover

SpecTec: test262layer: spec

Write-up 35: Contains never finds an |AwaitExpression|: async function f(x = await 1) {} has no early error →

§8.5.1 Static Semantics: Contains, step 1.a

If child is an instance of symbol, return true.

The test262 and proposed readings
  1. If child is an instance of symbol, return true.
  2. If symbol is AwaitExpression and this Parse Node is an instance of the production UnaryExpression : CoverAwaitExpressionAndAwaitUsingDeclarationHead, return true.

Formalization note

An await expression parses as UnaryExpression : CoverAwaitExpressionAndAwaitUsingDeclarationHead, and AwaitExpression is only the cover's refined interpretation, so the default definition never meets an AwaitExpression and every early error rule "X Contains AwaitExpression" holds vacuously. test262 requires them (built-ins/AsyncGeneratorFunction/instance-await-expr-in-param.js, language/expressions/async-generator/early-errors-expression-formals-contains-await-expr.js, language/expressions/async-arrow-function/await-as-param-nested-arrow-body-position.js). The reading counts the cover of that production, and not the cover of an AwaitUsingDeclaration, as an AwaitExpression. The proposed text is the equivalent Contains row for UnaryExpression : CoverAwaitExpressionAndAwaitUsingDeclarationHead: "1. If symbol is AwaitExpression, return true. 2. Let expr be the AwaitExpression that is covered by CoverAwaitExpressionAndAwaitUsingDeclarationHead. 3. Return expr Contains symbol."

In SpecTec
The test262 reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: none found (searched for "CoverAwaitExpressionAndAwaitUsingDeclarationHead", no hits). The cover came with PR #3000 (merged 2026-06, commit f792966f2), which replaced UnaryExpression's [+Await] AwaitExpression[?Yield] by it; issue #917 (closed, 2018-03), "await in parameters", predates it.

The program tests/run/await_in_params_early_errors.js, verified with ecma-run tests/run/await_in_params_early_errors.js:

The test262 reading (baked into SpecTec · verified)normal: undefined
  • async function: SyntaxError
  • async function expression: SyntaxError
  • async generator: SyntaxError
  • async generator expression: SyntaxError
  • async method: SyntaxError
  • async generator method: SyntaxError
  • arrow in async body: SyntaxError
  • async arrow in async body: SyntaxError
  • AsyncFunction: SyntaxError
  • AsyncGeneratorFunction: SyntaxError
  • await in async body: no error
  • static block in async function: no error
  • var await in nested function: no error
  • async arrow parameters: no error
  • await in static block: SyntaxError
  • var await in static block function: no error
The literal text (alternative reading)normal: undefined
  • async function: no error
  • async function expression: no error
  • async generator: no error
  • async generator expression: no error
  • async method: no error
  • async generator method: no error
  • arrow in async body: no error
  • async arrow in async body: no error
  • AsyncFunction: no error
  • AsyncGeneratorFunction: no error
  • await in async body: no error
  • static block in async function: no error
  • var await in nested function: no error
  • async arrow parameters: no error
  • await in static block: SyntaxError
  • var await in static block function: no error

Cross-engine runs

Source
// expect: normal: undefined
// print: async function: SyntaxError
// print: async function expression: SyntaxError
// print: async generator: SyntaxError
// print: async generator expression: SyntaxError
// print: async method: SyntaxError
// print: async generator method: SyntaxError
// print: arrow in async body: SyntaxError
// print: async arrow in async body: SyntaxError
// print: AsyncFunction: SyntaxError
// print: AsyncGeneratorFunction: SyntaxError
// print: await in async body: no error
// print: static block in async function: no error
// print: var await in nested function: no error
// print: async arrow parameters: no error
// print: await in static block: SyntaxError
// print: var await in static block function: no error
// The early errors "X Contains |AwaitExpression|" (§15.3.1, §15.6.1, §15.8.1,
// §15.9.1): an `await` expression is the cover of UnaryExpression :
// CoverAwaitExpressionAndAwaitUsingDeclarationHead, which Contains counts as an
// AwaitExpression (Erratum ContainsAwaitCover, its test262 reading).
// Contains does not look into nested functions, and a static block's rule is
// on the terminal `await`.
var AsyncFunction = (async function () {}).constructor;
var AsyncGeneratorFunction = (async function* () {}).constructor;
function check(name, run) {
  try { run(); print(name + ": no error"); }
  catch (e) { print(name + ": " + e.constructor.name); }
}
function script(src) { return function () { (0, eval)(src); }; }
check("async function", script("async function f(x = await 1) {}"));
check("async function expression", script("(async function (x = await 1) {})"));
check("async generator", script("async function* f(x = await 1) {}"));
check("async generator expression", script("(async function* (x = await 1) {})"));
check("async method", script("({ async m(x = await 1) {} })"));
check("async generator method", script("({ async *m(x = await 1) {} })"));
check("arrow in async body", script("async function g() { (x = await 1) => 0; }"));
check("async arrow in async body", script("async function g() { async (x = await 1) => 0; }"));
check("AsyncFunction", function () { AsyncFunction("x = await 1", ""); });
check("AsyncGeneratorFunction", function () { AsyncGeneratorFunction("x = await 1", ""); });
check("await in async body", script("async function h() { await 1; }"));
check("static block in async function", script("(async function () { class C { static { } } })"));
check("var await in nested function", script("async function k(x = function () { var await; }) {}"));
check("async arrow parameters", script("async (x = 1) => await x;"));
check("await in static block", script("class C { static { await 0; } }"));
check("var await in static block function", script("class C { static { (function () { var await; }); } }"));

SplitCodeUnitStrings

SpecTec: test262layer: spec

Write-up 37: String.prototype.split with an empty separator builds an Array of code units →

§22.1.3.23 String.prototype.split, step 10.d

Let codeUnits be a List consisting of the sequence of code units that are the elements of head.

The test262 and proposed readings
  1. Let codeUnits be a new empty List.
  2. For each integer i such that 0 ≤ i < outLength, in ascending order, do
    1. Append the substring of head from i to i + 1 to codeUnits.

Formalization note

The literal step passes a List of code units to CreateArrayFromList, whose parameter is a List of ECMAScript language values; a code unit is not one. test262 requires the Array's elements to be the Strings of one code unit each (built-ins/String/prototype/split/separator-empty-string-instance-is-string.js), as the method's description says: "any separator coerced to the empty String splits the this value into individual code units".

In SpecTec
The test262 reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: none found (searched for split with "empty separator" and with "code units"). The List of code units came with PR #2144 (merged 2021-10, commit 82438c337); PR #2975 (merged 2026-10, commit cb866719b) rewrote the description and the notes, renamed lim, and left steps 10.d–e as they were; issue #3261 (closed, 2024-08), ""substring of" used with potentially out of bounds end in String.prototype.split()", was about step 10.c.

The program tests/run/errata_split_code_units.js, verified with ecma-run tests/run/errata_split_code_units.js:

The test262 reading (baked into SpecTec · verified)normal: "string"
The literal text (alternative reading)stop: sortError sec-typeof-operator-runtime-semantics-evaluation#0 13: stops at §13.5.3.1 Runtime Semantics: Evaluation, step 13 (a value of the wrong sort reaches the step)

Cross-engine runs

Source
// expect: normal: "string"
// String.prototype.split with the empty String as separator (Erratum SplitCodeUnitStrings):
// the test262 reading makes each element a String of one code unit.
typeof "ab".split("")[1];

OrdinarySetReceiverHasProperty

SpecTec: proposedlayer: spec

Write-up 38: OrdinarySetWithOwnDescriptor asserts what a Proxy receiver's trap need not tell →

§10.1.9.2 OrdinarySetWithOwnDescriptor, step 2.d.i

Assert: receiver does not currently have a property propertyKey.

Formalization note

Step 2.d.i's Assert follows _receiver_.[[GetOwnProperty]](_propertyKey_) returning undefined, which fails both when a Proxy receiver's trap hides a configurable target property and when an ordinary _receiver_ inherits _propertyKey_ from its prototype. SpecTec silences step 2.d.i via assert pass in S10.spectec:190 (write-up 38).

In SpecTec
The proposed reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: none found (searched for "OrdinarySetWithOwnDescriptor"). The Assert is in the first Ecmarkup version of the text (commit 7461eea82); PR #3789 (merged 2026-04, commit bab3fbf29) renamed its aliases.

The program tests/run/errata_ordinaryset_receiver.js, verified with ecma-run --checked tests/run/errata_ordinaryset_receiver.js:

The proposed reading (baked into SpecTec · verified)normal: "true,5,true,9"
The literal text (alternative reading)stop: assertFailed sec-ordinarysetwithowndescriptor#0 2.d.i: stops at §10.1.9.2 OrdinarySetWithOwnDescriptor, step 2.d.i (a failed Assert)

Cross-engine runs

Source
// args: --checked
// expect: normal: "true,5,true,9"
const t = { x: 1 };
const p = new Proxy(t, { getOwnPropertyDescriptor() { return undefined; } });
const ok1 = Reflect.set({}, "x", 5, p);
const proto = { y: 2 };
const child = Object.create(proto);
const ok2 = Reflect.set({}, "y", 9, child);
[ok1, t.x, ok2, child.y].join(",");

MustCoverEarlyErrorOrder

SpecTec: test262layer: spec

Write-up 39: Early error rules read "the |n| that is covered by" a cover that covers nothing →

§5.1.5 The Syntactic Grammar, "must cover", item 4

Otherwise (if the parse fails), it is an early Syntax Error.

§15.9.1 Static Semantics: Early Errors

It is a Syntax Error if any element of the BoundNames of CoverCallExpressionAndAsyncArrowHead also occurs in the LexicallyDeclaredNames of AsyncConciseBody.

Formalization note

When a cover fails its "must cover" rule (([...x = []]) => {}, async (...x = []) => {}), unordered sibling and ancestor early-error rules still ask for "the |n| that is covered by p" — a Parse Node that does not exist. SpecTec (@formal-earlyerrorsof and LinEarly.linOwn) short-circuits children before parents and runs must_cover rules before other rules at each node (write-up 39).

In SpecTec
The test262 reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: none found for this case (searched for "must cover" and "CoverInitializedName"). Issue #2421 (closed, 2026-07), "Early Error rules and covering grammars", asked which early error rules apply to a cover; PR #3227 (merged 2026-07, commit 020735388), "Editorial: Don't check a cover for early errors", answered it with item 1. PR #3223 (open, 2023-11), "Editorial: Separate cover grammar text into a subsection with autolink targets", moves the definition into a new subsection, Cover Productions, with its items as they are.

The program tests/run/errata_must_cover_order.js, verified with ecma-run tests/run/errata_must_cover_order.js:

The test262 reading (baked into SpecTec · verified)normal: "SyntaxError,SyntaxError,SyntaxError,ok"
The literal text (alternative reading)stop: assertFailed sec-static-semantics-contains#7 1: stops at §8.5.1 Static Semantics: Contains, step 1 (a failed Assert)

Cross-engine runs

Source
// expect: normal: "SyntaxError,SyntaxError,SyntaxError,ok"
let out = [];
for (const s of ["([...x = []]) => {};", "async (...x = []) => {};", "async\n(foo) => {};", "(x) => {};"]) {
  try { (0, eval)(s); out.push("ok"); } catch (e) { out.push(e.name); }
}
out.join(",");

RacesNotBoth

SpecTec: literallayer: none

Write-up 23: Races: "it is not the case that both" is always true →

§29.8 Races, step 1.a

If it is not the case that both eventA happens-before eventB in execution and eventB happens-before eventA in execution, then

Formalization note

Step 1.a of Races (sec-races) is always true: an execution's happens-before is a strict partial order, so eventA and eventB never both happen-before each other, and any two conflicting events race. The memory model's meaning (Ecma.MemoryModel.Race) reads the literal text. The proposed text of step 1.a: "If neither eventA happens-before eventB in execution nor eventB happens-before eventA in execution, then".

Read as written
The text never stops a run.
In SpecTec
The literal text.
Layer
Prose relations & unused rows. Applies in the SpecTec prose model (spec/spectec/prose/) or an unreachable grammar row.
Upstream
Checked 2026-11-19: PR #4021 (closed without merging, 2026-10), "Normative: exclude happens-before ordered events from races", proposed requiring that neither event happens-before the other; no issue was found (searched for "not the case that both" and "Races"). The wording came with PR #3321 (merged 2024-05, commit 1babaf809), "Editorial: Rework memory model relations", which replaced "If the pairs (E, D) and (D, E) are not in execution.[[HappensBefore]]".

No JavaScript program on this site shows this erratum (an axiomatic §29 relation).

InitHappensBeforeOverlap

SpecTec: literallayer: none

Write-up 48: happens-before orders an init write only before events with overlapping ranges, which excludes the equal range of a 1-byte access →

§29.6.6 happens-before, the third condition

SharedDataBlockEventSet(execution) contains both eventA and eventB, eventA.[[Order]] is init, and eventA and eventB have overlapping memory ranges.

Formalization note

The third condition of happens-before orders an init write only before events whose memory ranges are overlapping, and "overlapping" excludes equal ranges, so a 1-byte event at an init event's byte is not ordered after it. The proposed text: "SharedDataBlockEventSet(execution) contains both eventA and eventB, eventA.[[Order]] is init, eventA and eventB are not the same Shared Data Block event, and eventA and eventB do not have disjoint memory ranges."

Read as written
The text never stops a run.
In SpecTec
The literal text.
Layer
Prose relations & unused rows. Applies in the SpecTec prose model (spec/spectec/prose/) or an unreachable grammar row.
Upstream
Checked 2026-11-19: none found (searched for "happens-before" with init, and "overlapping"). The rule has its present form from PR #3321 (merged 2024-05, commit 1babaf809); before it, it read "[[HappensBefore]] contains (E, D) if E.[[Order]] is init and E and D have overlapping ranges". PR #3396 (merged 2025-11, commit f1bdd8c02) renamed "range" to "memory range".

No JavaScript program on this site shows this erratum (an axiomatic §29 relation).

MemoryRangeSameBlock

SpecTec: proposedlayer: none

Write-up 50: reads-bytes-from and coherent reads ask only for a byte index in a memory range, which names no [[Block]] →

§29.6.2 reads-bytes-from

Each event writeEvent with index i in writes has readEvent.[[ByteIndex]] + i in its memory range.

Formalization note

A memory range is a Set of integers, the byte indices from [[ByteIndex]], with no [[Block]] in it, so reads-bytes-from's "has readEvent.[[ByteIndex]] + i in its memory range" and coherent reads' "has byteLocation in its memory range" (step 1.c.ii) admit a write to another Shared Data Block at the same index. The proposed text, which the memory model's meaning (Ecma.MemoryModel.Rbf.Valid, CoherentReads) reads: "Each event writeEvent with index i in writes has readEvent.[[Block]] as its [[Block]] and readEvent.[[ByteIndex]] + i in its memory range", and in step 1.c.ii "a WriteSharedMemory or ReadModifyWriteSharedMemory event value whose [[Block]] is readEvent.[[Block]] and that has byteLocation in its memory range".

In SpecTec
The proposed reading.
Layer
Prose relations & unused rows. Applies in the SpecTec prose model (spec/spectec/prose/) or an unreachable grammar row.
Upstream
Checked 2026-11-19: none found (searched for "memory range"; the hits rename or link the term).

No JavaScript program on this site shows this erratum (an axiomatic §29 relation).

CreateIntrinsicsAsyncArgument

SpecTec: test262layer: spec

Write-up 33: CreateIntrinsics passes async in prefix's position: every built-in gets a Boolean prefix →

§9.3.2 CreateIntrinsics, step 2

Set fields of realmRecord.[[Intrinsics]] with the values listed in a table of §6.1.7.4. The field names are the names listed in the “Intrinsic Name” column of the table. The value of each field is a new object value fully and recursively populated with property values as defined by the specification of each object in clauses §19 through §28. All object property values are newly created object values. All values that are built-in function objects are created by performing CreateBuiltinFunction(steps, length, name, slots, realmRecord, proto, async) where steps is the definition of that function provided by this specification, name is the initial value of the function's "name" property, length is the initial value of the function's "length" property, slots is a list of the names, if any, of the function's specified internal slots, proto is the specified value of the function's [[Prototype]] internal slot, and async is true if the function is described as “async” and false otherwise. The creation of the intrinsics and their properties must be ordered to avoid any dependencies upon objects that have not yet been created.

The test262 and proposed readings
  1. Let entries be IntrinsicObjects().
  2. Let objects be a new empty List.
  3. For each Record entry of entries, do
    1. If entry.[[Prototype]] is null, let proto be null; else let proto be objects[entry.[[Prototype]]].
    2. If entry.[[Behaviour]] is not empty, then
      1. If entry.[[Prefix]] is empty, let obj be CreateBuiltinFunction(entry.[[Behaviour]], entry.[[Length]], entry.[[Name]], entry.[[Slots]], realmRecord, proto); else let obj be CreateBuiltinFunction(entry.[[Behaviour]], entry.[[Length]], entry.[[Name]], entry.[[Slots]], realmRecord, proto, entry.[[Prefix]]).
      2. Set obj.[[Async]] to entry.[[Async]].
      3. If entry.[[Constructor]] is true, set obj.[[Construct]] to the definition specified in §10.3.2.
    3. Else,
      1. Let obj be OrdinaryObjectCreate(proto, entry.[[Slots]]).
      2. If entry.[[Exotic]] is §10.4.2, then
        1. Set obj.[[DefineOwnProperty]] as specified in §10.4.2.1.
      3. Else if entry.[[Exotic]] is §10.4.3, then
        1. Set obj.[[GetOwnProperty]] as specified in §10.4.3.1.
        2. Set obj.[[DefineOwnProperty]] as specified in §10.4.3.2.
        3. Set obj.[[OwnPropertyKeys]] as specified in §10.4.3.3.
      4. Else if entry.[[Exotic]] is §10.4.7, then
        1. Set obj.[[SetPrototypeOf]] to the definition specified in §10.4.7.1.
    4. For each Record slot of entry.[[SlotValues]], do
      1. Perform SetFieldNamed(obj, slot.[[Name]], slot.[[Value]]).
    5. For each element name of entry.[[Names]], do
      1. Perform SetFieldNamed(realmRecord.[[Intrinsics]], name, obj).
    6. Append obj to objects.
  4. For each Record entry of entries, do
    1. Let obj be objects[entry.[[Index]]].
    2. If entry.[[Behaviour]] is not empty, then
      1. Let la be entry.[[LengthAttributes]].
      2. Perform ! DefinePropertyOrThrow(obj, "length", PropertyDescriptor { [[Writable]]: la.[[Writable]], [[Enumerable]]: la.[[Enumerable]], [[Configurable]]: la.[[Configurable]] }).
      3. Let na be entry.[[NameAttributes]].
      4. Perform ! DefinePropertyOrThrow(obj, "name", PropertyDescriptor { [[Writable]]: na.[[Writable]], [[Enumerable]]: na.[[Enumerable]], [[Configurable]]: na.[[Configurable]] }).
    3. For each Record p of PropertyOrder(obj, entry.[[Properties]]), do
      1. If PropertyProvided(p) is true, perform OwnPropertyCreate(obj, p.[[Key]], IntrinsicPropertyDescriptor(p, objects), p.[[Kind]]).
    4. Set obj.[[Extensible]] to entry.[[Extensible]].

Formalization note

Step 2 creates each built-in function by "CreateBuiltinFunction(steps, length, name, slots, realmRecord, proto, async)", which passes async as CreateBuiltinFunction's prefix and gives no accessor its prefix; read literally, SetFunctionName concatenates a Boolean and realm creation stops. test262 requires both: built-ins/Array/fromAsync/ (an async function) and built-ins/Map/prototype/size/name.js ("get size"). The proposed text: "CreateBuiltinFunction(steps, length, name, slots, realmRecord, proto, prefix, async), where prefix is "get" or "set" for a get or set accessor function of a built-in property and empty otherwise", with an empty prefix read as not present.

Read as written
A run stops at §10.2.9 SetFunctionName, step 5.a, when called from §10.3.4 CreateBuiltinFunction.
In SpecTec
The test262 reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: issue #3534 (open, 2025-02), "CreateIntrinsics isn't passing prefix to CreateBuiltinFunction for builtin getters/setters", reports the missing prefix; issue #4046 (open, 2026-10), "Editorial: CreateBuiltinFunction call in CreateIntrinsics passes wrong parameters", reports the argument position. PR #4022 (closed without merging, 2026-10) proposed six arguments and setting [[Async]] afterwards; PR #2833 (open, 2022-07), "Editorial: Specify prefix for non-specific uses of CreateBuiltinFunction", passes prefix last and predates async, which came with PR #2942 (merged 2025-12, commit 7029ed1b2).

The program tests/run/errata_createintrinsics_async_argument.js, verified with ecma-run tests/run/errata_createintrinsics_async_argument.js:

The test262 reading (baked into SpecTec · verified)normal: "get size|true"
The literal text (alternative reading)stop: sortError sec-setfunctionname#0 5.a: stops at §10.2.9 SetFunctionName, step 5.a (a value of the wrong sort reaches the step)

Cross-engine runs

Source
// expect: normal: "get size|true"
// CreateIntrinsics step 2 (Erratum CreateIntrinsicsAsyncArgument): the
// test262 reading passes a getter its prefix and Array.fromAsync its [[Async]].
var r = [];
r.push(Object.getOwnPropertyDescriptor(Map.prototype, "size").get.name);
r.push(Array.fromAsync([1]) instanceof Promise);
r.join("|");

SortInfiniteComparator

SpecTec: test262layer: spec

Write-up 31: Sort: a comparator that returns ±∞ is neither consistent nor inconsistent →

§23.1.3.30.1 SortIndexedProperties, step 4

Sort items using an implementation-defined sequence of calls to sortCompare. If any such call returns an abrupt completion, stop before performing any further calls to sortCompare and return that Completion Record.

The test262 and proposed readings
  1. Let next be SortStep(the number of elements in items, empty, empty).
  2. Repeat, while next is a List,
    1. Let result be sortCompare(items[next[0]], items[next[1]]).
    2. If result is an abrupt completion, return result.
    3. Set next to SortStep(the number of elements in items, next[2], result).
  3. Let sorted be a new empty List.
  4. For each element i of next.[[Value]], do
    1. Append items[i] to sorted.
  5. Set items to sorted.

Formalization note

The definition of a consistent comparator reads each result as ℝ(comparator(a, b)), which has no value for ±∞; the literal reading stops there. No test262 test has a comparator return ±∞. The test262 reading has no ℝ step: by SortStep's law no consistent comparator gives a ±∞ result, so the order is the host's, and both test hosts order by the result's sign. The proposed text compares the Number itself with +0𝔽 where the text takes ℝ of it, in the sort order's two conditions ("if sortCompare(old[j], old[k]) < +0𝔽", "… = +0𝔽") and in the definition of a consistent comparator ("a <C b means comparator(a, b) < +0𝔽", likewise for =C and >C).

In SpecTec
The test262 reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: none found (searched for "consistent comparator" and for comparator with Infinity). Issue #3172 (open, 2023-09), "Call SortCompare only on actual elements", is about which values SortCompare is called on.

The program tests/run/errata_sort_infinite_comparator.js, verified with ecma-run tests/run/errata_sort_infinite_comparator.js:

The test262 reading (baked into SpecTec · verified)normal: "1,2,3|3,2,1"
The literal text (alternative reading)stop: sortError sec-sortindexedproperties#0 4..ccxlii.2.c: stops at §23.1.3.30.1 SortIndexedProperties, step 4 (inside the reading of that step) (a value of the wrong sort reaches the step)

Cross-engine runs

Source
// expect: normal: "1,2,3|3,2,1"
// A comparator that returns ±Infinity (Erratum SortInfiniteComparator): under
// the test262 reading the order is the host's, and the test host's goes by the
// result's sign.
var r = [];
r.push([3, 1, 2].sort(function (a, b) { return a < b ? -Infinity : a > b ? Infinity : 0; }).join());
r.push([1, 3, 2].sort(function (a, b) { return a < b ? Infinity : a > b ? -Infinity : 0; }).join());
r.join("|");

UnregisterIteratesCopy

SpecTec: test262layer: spec

Write-up 45: FinalizationRegistry.prototype.unregister removes cells from the List it iterates →

§26.2.3.3 FinalizationRegistry.prototype.unregister, step 5

For each Record { [[WeakRefTarget]], [[HeldValue]], [[UnregisterToken]] } cell of finalizationRegistry.[[Cells]], do

The test262 and proposed readings
  1. Let cells be a copy of finalizationRegistry.[[Cells]].
  2. For each Record { [[WeakRefTarget]], [[HeldValue]], [[UnregisterToken]] } cell of cells, do
    1. If cell.[[UnregisterToken]] is not empty and SameValue(cell.[[UnregisterToken]], unregisterToken) is true, then
      1. Remove cell from finalizationRegistry.[[Cells]].
      2. Set removed to true.

Formalization note

The literal step removes from the List it iterates, and the For each convention does not say which element comes next; read literally, the cell after a removed one is skipped. test262 requires every cell with the token to go (built-ins/FinalizationRegistry/prototype/unregister/unregister-object-token.js and unregister-symbol-token.js register two cells with one token in a row). The proposed text iterates a copy, as above.

Read as written
The text never stops a run.
In SpecTec
The test262 reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: none found (searched for FinalizationRegistry with unregister). The step came with PR #2089 (merged 2020-08, commit 71c089717), "Normative: Add Weakrefs and FinalizationRegistry".

The program tests/run/errata_unregister_two_cells.js, verified with ecma-run tests/run/errata_unregister_two_cells.js:

The test262 reading (baked into SpecTec · verified)normal: "true|false"
The literal text (alternative reading)normal: "true|true"

Cross-engine runs

Source
// expect: normal: "true|false"
// Two cells with one unregister token, in a row (Erratum
// UnregisterIteratesCopy): the test262 reading removes both.
var fr = new FinalizationRegistry(function () {});
var token = {};
fr.register({}, 1, token);
fr.register({}, 2, token);
[fr.unregister(token), fr.unregister(token)].join("|");

IsCharacterClassControlLetter

SpecTec: test262layer: spec

Write-up 49: Annex B: /[\c1-\c5]/ asks for the IsCharacterClass of ClassEscape :: c ClassControlLetter, which has none →

§B.1.2.3 Static Semantics: IsCharacterClass has no row for ClassEscape :: `c` ClassControlLetter.

The test262 and proposed readings
  1. Return false.

Formalization note

IsCharacterClass has no definition for this production of §B.1.2, whose CharacterValue §B.1.2.4 gives, and §B.1.2.1's range rules ask for it of every ClassAtom of a range: /[\c1-\c5]/. The literal text stops there (it asks IsCharacterClass of ClassControlLetter, which has no definition either). The row is the twin of ClassEscape :: CharacterEscape's: the escape is one character. No test262 test has \c and a digit or _ at a range's end; annexB/language/literals/regexp/class-escape.js reads [\c1] as U+0011.

In SpecTec
The test262 reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: none found (searched for "IsCharacterClass" and "ClassControlLetter"). Related: PR #2445 (open, 2021-06) rewrites the grammar line of §B.1.2.3 and adds no rule for ClassEscape :: c ClassControlLetter.

The program tests/run/errata_ischaracterclass_control_letter.js, verified with ecma-run --annex-b sec-regular-expressions-patterns tests/run/errata_ischaracterclass_control_letter.js:

The test262 reading (baked into SpecTec · verified)normal: true
The literal text (alternative reading)stop: sortError row-ischaracterclass-classcontrolletter#0 1: stops at row-ischaracterclass-classcontrolletter (a helper clause of SpecTec), step 1 (a value of the wrong sort reaches the step)

Source
// expect: normal: true
// args: --annex-b sec-regular-expressions-patterns
// A class range between two \c escapes of B.1.2 (Erratum IsCharacterClassControlLetter):
// the test262 reading gives IsCharacterClass a row for ClassEscape :: `c` ClassControlLetter.
/[\c1-\c5]/.test("\x11");

StringLengthOverflow

SpecTec: proposedlayer: spec

Write-up 53: String operations omit > 2^53 - 1 length checks required by §6.1.4's maximum String length →

§22.1.3.18 String.prototype.repeat, step 7

Return the String value that is made from n copies of string appended together.

The proposed reading
  1. If StringTooLarge(n × the length of string) is true, throw a RangeError exception.
  2. Return the String value that is made from n copies of string appended together.
§22.1.3.5 String.prototype.concat, step 5.b

Set result to the string-concatenation of result and nextString.

The proposed reading
  1. If StringTooLarge(the length of result + the length of nextString) is true, throw a RangeError exception.
  2. Set result to the string-concatenation of result and nextString.
§13.15.3 ApplyStringOrNumericBinaryOperator, step 1.c.iii

Return the string-concatenation of leftString and rightString.

The proposed reading
  1. If StringTooLarge(the length of leftString + the length of rightString) is true, throw a RangeError exception.
  2. Return the string-concatenation of leftString and rightString.
§23.1.3.18.1 JoinIndexedProperties, step 4.a

If k > 0, set result to the string-concatenation of result and separator.

The proposed reading
  1. If k > 0, then
    1. If StringTooLarge(the length of result + the length of separator) is true, throw a RangeError exception.
    2. Set result to the string-concatenation of result and separator.
§23.1.3.18.1 JoinIndexedProperties, step 4.d.iii

Set result to the string-concatenation of result and elementString.

The proposed reading
  1. If StringTooLarge(the length of result + the length of elementString) is true, throw a RangeError exception.
  2. Set result to the string-concatenation of result and elementString.

Formalization note

§6.1.4 defines the String type as sequences of up to 253 - 1 16-bit elements, yet String.prototype.repeat ("ab".repeat(2 ** 52)), String.prototype.concat, +, and JoinIndexedProperties have no > 2^53 - 1 length guard before forming their result. SpecTec checks StringTooLarge (Host.ValueLaws.stringTooLarge, answering true past 228 and therefore past 253 - 1 in Engine) and throws a RangeError (write-up 53).

In SpecTec
The proposed reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-20: none found for the missing > 2^53 - 1 check in repeat, concat, + and JoinIndexedProperties (searched for String with "maximum length" and "RangeError"). Related: issue #4063 (closed, 2026-10), "Specify that exceeding resource limits may throw".

The program tests/run/errata_string_length_overflow.js, verified with ecma-run tests/run/errata_string_length_overflow.js:

The proposed reading (baked into SpecTec · verified)throw: RangeError
The literal text (alternative reading)stop: implLimit sec-string.prototype.repeat#0 7: stops at §22.1.3.18 String.prototype.repeat, step 7 (an implementation limit of the engine)
Source
// expect: throw: RangeError
"ab".repeat(2 ** 52);

RegExpUnicodeEscapeLookahead

SpecTec: test262layer: parser

Write-up 55: RegExpUnicodeEscapeSequence: escaped surrogate pairs are ambiguous in the formal grammar →

§22.2.1 Patterns

Each \\u HexTrailSurrogate for which the choice of associated u HexLeadSurrogate is ambiguous shall be associated with the nearest possible u HexLeadSurrogate that would otherwise have no corresponding \\u HexTrailSurrogate.

Formalization note

In §22.2.1's formal grammar, RegExpUnicodeEscapeSequence[+UnicodeMode] has both u HexLeadSurrogate \u HexTrailSurrogate and unguarded u HexLeadSurrogate alongside u HexTrailSurrogate, leaving /\uD800\uDC00+/u, /[\uD800\uDC00]/u and /(?<\uD835\uDC9C>a)/ context-free ambiguous. SpecTec attaches a 16-prefix [lookahead not_in { "\uDC", … }] override in grammar-meta.txt and 04-grammar-regexp.spectec so greedy surrogate pairing is unambiguous and ParseLaws.complete holds (write-up 55).

In SpecTec
The test262 reading.
Layer
Grammar & parser. Baked into the SpecTec grammars (spec/spectec/01..07-grammar-*.spectec) and the parser.
Upstream
Checked 2026-11-19: none found (searched for "RegExpUnicodeEscapeSequence" and "HexLeadSurrogate").

The program tests/run/errata_regexp_unicode_escape_lookahead.js, verified with ecma-run tests/run/errata_regexp_unicode_escape_lookahead.js:

The test262 reading (baked into SpecTec · verified)normal: "true,true,a"
The literal text (alternative reading)stop: residue formal-parsetextin#0 2: stops at formal-parsetextin (a helper clause of SpecTec), step 2 (a step of the text with no reading the machine can run)
Source
// expect: normal: "true,true,a"
[
  /\uD800\uDC00+/u.test("\u{10000}\u{10000}"),
  /[\uD800\uDC00]/u.test("\u{10000}"),
  /(?<\uD835\uDC9C>a)/.exec("a").groups["\u{1D49C}"],
].join(",");

PostASILexicalGoal

SpecTec: test262layer: parser

Write-up 56: Post-ASI / lexical goal selection and non-Script ParseText starting goals →

§12 ECMAScript Language: Lexical Grammar

The InputElementRegExp goal symbol is used in all syntactic grammar contexts where a RegularExpressionLiteral is permitted … In all other contexts, InputElementDiv is used as the lexical goal symbol.

§12.10.1 Rules of Automatic Semicolon Insertion

In the following rules, “token” means the actual recognized lexical token determined using the current lexical goal symbol as described in clause

Formalization note

Before ASI inserts ; after let a or do {} while (false), no RegularExpressionLiteral is syntactically permitted, so literal §12 scans / on the next line as DivPunctuator and never re-lexes it after inserting ; — rejecting let a\n/x/.test("x")! §12 also omits initial lexical goals for non-Script/Module ParseText calls. SpecTec (GoalsAt and NextASI in 04-derives.spectec) probes offending tokens under InputElementDiv and re-scans post-ASI tokens under their post-; syntactic context, using InputElementHashbangOrRegExp only at index 0 of Script or Module (write-up 56).

In SpecTec
The test262 reading.
Layer
Grammar & parser. Baked into the SpecTec grammars (spec/spectec/01..07-grammar-*.spectec) and the parser.
Upstream
Checked 2026-11-19: none found (searched for "InputElementRegExp" with "semicolon insertion").

The program tests/run/post_asi_regexp.js, verified with ecma-run tests/run/post_asi_regexp.js:

The test262 reading (baked into SpecTec · verified)normal: true
The literal text (alternative reading)throw: SyntaxError
Source
// expect: normal: true
let a
/x/.test("x");

let r1 = false;
let b
r1 = /x/.test("x");

function f() {
  return
  /y/.test("y");
}

let r2 = (f() === undefined);

let r3 = false;
do {
  r3 = true
} while (false) /z/.test("z");

let r4 = `${function() { let c = 1
  return c
}()}` === "1";

r1 && r2 && r3 && r4;

ForLexicalHeaderASI

SpecTec: test262layer: parser

Write-up 57: ASI in for ( LexicalDeclaration … ) headers, left-to-right prefix order, and [no LineTerminator here] in lookahead sets →

§12.10.1 Rules of Automatic Semicolon Insertion

However, there is an additional overriding condition on the preceding rules: a semicolon is never inserted automatically if the semicolon would then be parsed as an empty statement or if that semicolon would become one of the two semicolons in the header of a for statement

Formalization note

In ForStatement : for ( LexicalDeclaration Expression? ; Expression? ) Statement, the first header ; belongs to the child LexicalDeclaration rather than ForStatement; §5.1.5's declarative ASI also leaves a = b\n+c ambiguous; and §5.1.6.7 leaves [no LineTerminator here] inside lookahead sets undefined. SpecTec (04-derives.spectec) bans virtual ; at the end of a for-header LexicalDeclaration (ForHeadersExplicit), formalizes left-to-right maximal viable prefix ASI (ValidASI), and adds LookItem.noLT (write-up 57).

In SpecTec
The test262 reading.
Layer
Grammar & parser. Baked into the SpecTec grammars (spec/spectec/01..07-grammar-*.spectec) and the parser.
Upstream
Checked 2026-11-19: none found (searched for "header of a for statement" with "LexicalDeclaration").

The program tests/run/errata_for_lexical_header_asi.js, verified with ecma-run tests/run/errata_for_lexical_header_asi.js:

The test262 reading (baked into SpecTec · verified)normal: "SyntaxError,SyntaxError,3"
The literal text (alternative reading)normal: "ok,ok,1"
Source
// expect: normal: "SyntaxError,SyntaxError,3"
let out = [];
for (const s of ["for (let a\n a < 1; a++) {}", "let a;\na\n[\n] = [];"]) {
  try { (0, eval)(s); out.push("ok"); } catch (e) { out.push(e.name); }
}
let a = 0, b = 1, c = 2;
a = b
+c;
out.push(a);
out.join(",");

CoverMatchedVirtualSemis

SpecTec: test262layer: parser

Write-up 58: Cover-grammar reparsing omits semicolons inserted by ASI inside the cover →

§5.1.5 The Syntactic Grammar

The sequence of tokens originally matched by p is parsed again using n as the goal symbol.

Formalization note

§5.1.5 and §12.10 define ASI only for Script and Module, without stating that virtual semicolons inserted inside a cover p (such as (function () { let a\n return 1 })()) survive when p is reparsed as n. SpecTec's GrammarCtx.CoverIs (06-node-rel.spectec) and Ecma.reparse (Ops/Parse.lean, Relabel.lean) preserve virtual semicolons inside reparsed covers (write-up 58).

In SpecTec
The test262 reading.
Layer
Grammar & parser. Baked into the SpecTec grammars (spec/spectec/01..07-grammar-*.spectec) and the parser.
Upstream
Checked 2026-11-19: none found (searched for "originally matched by" with "semicolon insertion").

The program tests/run/errata_cover_virtual_semis.js, verified with ecma-run tests/run/errata_cover_virtual_semis.js:

The test262 reading (baked into SpecTec · verified)normal: "1,2,3"
The literal text (alternative reading)throw: SyntaxError
Source
// expect: normal: "1,2,3"
const v1 = (function () { let a
  return 1 })();
const v2 = ((x = function () { let b
  return 2 }) => x())();
let v3 = 0;
({ m() { let c = 3
  return c } }.m && (v3 = ({ m() { let c = 3
  return c } }).m()));
[v1, v2, v3].join(",");

RegExpExecEndOfString

SpecTec: test262layer: spec

Write-up 59: RegExpBuiltinExec step 13.b indexes out-of-bounds element _lastIndex_ of _string_ at end of string →

§22.2.7.2 RegExpBuiltinExec, steps 13.a and 13.b

If lastIndex > length, then … Let inputIndex be the index into input of the character that was obtained from element lastIndex of string.

Formalization note

Step 13.a exits only when _lastIndex_ > _length_, so at _lastIndex_ = _length_ (reached on "", /$/, and the exhaustion step of every /g match) step 13.b asks for non-existent element _lastIndex_ of _string_ in both BMP and Unicode modes. SpecTec's @ph-input-index-of (Helpers.spectec:78-89) returns $ListLen(_input_) when _lastIndex_ == _length_ (write-up 59).

In SpecTec
The test262 reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: none found for _lastIndex_ = _length_ at step 13.b (issues #128 and #2511 concern surrogate pairs, see 11).

The program tests/run/errata_regexp_exec_end.js, verified with ecma-run tests/run/errata_regexp_exec_end.js:

The test262 reading (baked into SpecTec · verified)normal: "a,1,null,0,,1"
The literal text (alternative reading)stop: sortError ph-input-index-of#0 1: stops at ph-input-index-of (a helper clause of SpecTec), step 1 (a value of the wrong sort reaches the step)
Source
// expect: normal: "a,1,null,0,,1"
const r = /a/g;
const m1 = r.exec("a")[0];
const i1 = r.lastIndex;
const m2 = String(r.exec("a"));
const i2 = r.lastIndex;
const m3 = /(?:)/u.exec("")[0];
const m4 = /$/gu.exec("x").index;
[m1, i1, m2, i2, m3, m4].join(",");

AnnexBFunctionEvalEmpty

SpecTec: test262layer: spec

Write-up 60: Annex B.3.2 block-function replacement steps return ~unused~ instead of ~empty~ →

§15.2.6 Runtime Semantics: Evaluation, FunctionDeclaration Evaluation

Return empty.

§10.2.11 FunctionDeclarationInstantiation, Annex B.3.2.1 replacement steps

When the FunctionDeclaration funcDecl is evaluated, perform the following steps in place of the FunctionDeclaration Evaluation algorithm … Return unused.

Formalization note

All three Annex B.3.2 replacement algorithms (FunctionDeclarationInstantiation, GlobalDeclarationInstantiation, EvalDeclarationInstantiation) run in place of FunctionDeclaration Evaluation and end with Return ~unused~ instead of Return ~empty~, which would leak ~unused~ out of eval("{ function f() {} }") and overwrite prior statement values. SpecTec (S15.spectec:831-837) discards the closure's normal ~unused~ result and returns ~empty~ (write-up 60).

In SpecTec
The test262 reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: none found (searched for "in place of the |FunctionDeclaration| Evaluation" and "Return unused").

The program tests/run/errata_annexb_function_eval_empty.js, verified with ecma-run --web-browser tests/run/errata_annexb_function_eval_empty.js:

The test262 reading (baked into SpecTec · verified)normal: "undefined,42"
The literal text (alternative reading)stop: sortError sec-performeval#0 28: stops at §19.2.1.1 PerformEval, step 28 (a value of the wrong sort reaches the step)
Source
// args: --web-browser
// expect: normal: "undefined,42"
[String(eval("{ function f() { return 1; } }")), eval("42; { function g() {} }")].join(",");

AnnexBQuantifiableAssertion

SpecTec: test262layer: spec

Write-up 61: Annex B.1.2.5 CompileSubpattern calls undefined 2-argument CompileAtom on QuantifiableAssertion →

§B.1.2.5 Runtime Semantics: CompileSubpattern

The rule for Term :: QuantifiableAssertion Quantifier is the same as for Term :: Atom Quantifier but with QuantifiableAssertion substituted for Atom.

Formalization note

Substituting QuantifiableAssertion for Atom in Term :: Atom Quantifier calls 2-argument CompileAtom(_regexpRecord_, _direction_), which has no row for QuantifiableAssertion (whose semantics in §B.1.2.6 is 1-argument CompileAssertion(_regexpRecord_)). SpecTec adds @row-compilesubpattern-quantifiableassertion-quantifier in Helpers.spectec calling 1-argument CompileAssertion (write-up 61).

In SpecTec
The test262 reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: none found (searched for "QuantifiableAssertion" with "CompileSubpattern").

The program tests/run/errata_annexb_quantifiable_assertion.js, verified with ecma-run --web-browser tests/run/errata_annexb_quantifiable_assertion.js:

The test262 reading (baked into SpecTec · verified)normal: "a,a"
The literal text (alternative reading)stop: sortError row-compilesubpattern-quantifiableassertion-quantifier#0 1: stops at row-compilesubpattern-quantifiableassertion-quantifier (a helper clause of SpecTec), step 1 (a value of the wrong sort reaches the step)
Source
// args: --web-browser
// expect: normal: "a,a"
[/(?=a)+a/.exec("a")[0], /(?!b)*a/.exec("a")[0]].join(",");

AnnexBCapturingParensAssert

SpecTec: test262layer: spec

Write-up 62: CountLeftCapturingParensWithin step 1 fails its #sec-patterns Assert: on every quantified §B.1.2 term →

§22.2.1.2 Static Semantics: CountLeftCapturingParensWithin, step 1

Assert: parseNode is an instance of a production in the RegExp Pattern grammar.

§B.1.2.2 Static Semantics: CountLeftCapturingParensWithin and CountLeftCapturingParensBefore

In the definitions of CountLeftCapturingParensWithin and CountLeftCapturingParensBefore, references to “Atom :: ( GroupSpecifier? Disjunction )” are to be interpreted as meaning “Atom :: ( GroupSpecifier? Disjunction )” or “ExtendedAtom :: ( GroupSpecifier? Disjunction )”.

Formalization note

§B.1.2.2 extends step 2 of CountLeftCapturingParensWithin to count ExtendedAtom groups, but leaves step 1 asserting #sec-patterns, which fails on every quantified §B.1.2 ExtendedAtom or QuantifiableAssertion (#sec-regular-expressions-patterns). SpecTec includes all 36 Annex B RegExp productions in clause_prods @sec-patterns (00-decls.spectec) and dispatches ParsePattern and CompileToCharSet under §B.1.2 (write-up 62).

In SpecTec
The test262 reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: none found (searched for "CountLeftCapturingParensWithin" with "Annex B").

The program tests/run/errata_annexb_capturing_parens.js, verified with ecma-run --checked --web-browser tests/run/errata_annexb_capturing_parens.js:

The test262 reading (baked into SpecTec · verified)normal: "true,a"
The literal text (alternative reading)stop: assertFailed sec-countleftcapturingparenswithin#0 1: stops at §22.2.1.2 Static Semantics: CountLeftCapturingParensWithin, step 1 (a failed Assert)
Source
// args: --checked --web-browser
// expect: normal: "true,a"
[/a+/.test("aa"), /(a)+/.exec("aa")[1]].join(",");

AnnexBReplacingAndB33

SpecTec: test262layer: spec

Write-up 63: Annex B.3.2 type errors (Early Errors for _func_, Contains on Parse Nodes), §B.3.3 synthetic blocks, and §B.1.1 comment ambiguity →

§10.2.11 FunctionDeclarationInstantiation

If replacing the FunctionDeclaration funcDecl with a VariableStatement that has funcName as a BindingIdentifier would not produce any Early Errors for func and paramNames does not contain funcName, then

§B.3.3 FunctionDeclarations in IfStatement Statement Clauses

Source text matched by this production is processed as if each matching occurrence of FunctionDeclaration[?Yield, ?Await, ~Default] was the sole StatementListItem of a BlockStatement occupying that position in the source text.

Formalization note

§B.3.2 tests "Early Errors for func" on a Function Object _func_ and "code Contains x" on a Parse Node _x_; §B.3.3 speaks of a "synthetic BlockStatement" with no AST or SDO rules; and §B.1.1 extends MultiLineComment with optional HTMLCloseComment?, making /*a\nb*/ ambiguous. SpecTec reparses spliced "var " + F + ";" on the root source, widens Contains to Parse Node identity, splices { } for B.3.3 via $CoveredBy(|IfStatement|, node) (including in LinEarly.linTree), and existentially quantifies trivia trees (write-up 63).

In SpecTec
The test262 reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: none found (searched for "Early Errors for func" and "synthetic |BlockStatement|").

The program tests/run/errata_annexb_replacing_b33.js, verified with ecma-run --web-browser tests/run/errata_annexb_replacing_b33.js:

The test262 reading (baked into SpecTec · verified)normal: "function,0,function,function"
The literal text (alternative reading)stop: sortError ph-annexb-replacing#0 1: stops at ph-annexb-replacing (a helper clause of SpecTec), step 1 (a value of the wrong sort reaches the step)
Source
// args: --web-browser
// expect: normal: "function,0,function,function"
/* multi-line
   comment without --> */
function g() {
  { function f() { return 1; } }
  let y = 0;
  { function y() { return 2; } }
  if (true) function h() { return 3; }
  const k = (() => { if (true) function m() { return 4; } return typeof m; })();
  return [typeof f, y, typeof h, k].join(",");
}
g();

SupplementalCoveredBy

SpecTec: test262layer: spec

Write-up 64: Supplemental syntax "covered by" without "must cover", and DestructuringAssignmentTarget cover-node mismatch →

§13.3.6.1 Runtime Semantics: Evaluation, step 1

Let expr be the CallMemberExpression that is covered by CoverCallExpressionAndAsyncArrowHead.

§13.15.5.6 Runtime Semantics: KeyedDestructuringAssignmentEvaluation, step 1.a

Let assignmentPattern be the AssignmentPattern that is covered by DestructuringAssignmentTarget.

Formalization note

CallMemberExpression and AwaitExpression use "covered by" with no "must cover" rule anywhere in ECMA-262, and Keyed/IteratorDestructuringAssignmentEvaluation ask for the AssignmentPattern covered by DestructuringAssignmentTarget whereas §13.15.5 puts the "must cover" rule on its child LeftHandSideExpression. SpecTec's $CoveredBy (Ecma.reparse in Ops/Parse.lean) reparses on demand whenever (n, k) was not cached by must_cover (write-up 64).

In SpecTec
The test262 reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: none found (searched for "CallMemberExpression" and "DestructuringAssignmentTarget" with "covered by"). PR #3223 (open, 2023-11) refactors §5.1.5's cover text without adding "must cover" rules for CallMemberExpression or AwaitExpression.

The program tests/run/errata_supplemental_covered_by.js, verified with ecma-run tests/run/errata_supplemental_covered_by.js:

The test262 reading (baked into SpecTec · verified)normal: undefined
  • 30
The literal text (alternative reading)stop: residue sec-function-calls-runtime-semantics-evaluation#0 1: stops at §13.3.6.1 Runtime Semantics: Evaluation, step 1 (a step of the text with no reading the machine can run)
Source
// expect: normal: undefined
// print: 30
async function run() {
  let a, b;
  ({ x: { a }, y: [b] } = { x: { a: 10 }, y: [20] });
  return (await Promise.resolve(a)) + b;
}
void run().then(v => print(v));

ToISOStringYearForm

SpecTec: test262layer: spec

Write-up 65: Date.prototype.toISOString leaves 4-digit vs expanded ±YYYYYY year format unspecified for 0..9999 →

§21.4.4.36 Date.prototype.toISOString, step 7

Return a String representation of tv in the Date Time String Format on the UTC time scale, including all format elements and the UTC offset representation "Z".

§21.4.1.32 Date Time String Format

YYYY is the year in the proleptic Gregorian calendar as four decimal digits from 0000 to 9999, or as an expanded year of "+" or "-" followed by six decimal digits.

Formalization note

§21.4.1.32 permits both 4-digit YYYY and expanded +00YYYY for years in 0..9999, whereas test262 and all engines require 4-digit YYYY for 0..9999. SpecTec adds $ExpandedYearForm in S21.spectec and binds it to false in Engine/Host/Core.lean (write-up 65).

In SpecTec
The test262 reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: none found (searched for "toISOString" with "expanded year").

The program tests/run/errata_toisostring_year_form.js, verified with ecma-run tests/run/errata_toisostring_year_form.js:

The test262 reading (baked into SpecTec · verified)normal: "1900-01-01T00:00:00.000Z,2026-01-01T00:00:00.000Z,+010000-01-01T00:00:00.000Z"
The literal text (alternative reading)normal: "+001900-01-01T00:00:00.000Z,+002026-01-01T00:00:00.000Z,+010000-01-01T00:00:00.000Z"
Source
// expect: normal: "1900-01-01T00:00:00.000Z,2026-01-01T00:00:00.000Z,+010000-01-01T00:00:00.000Z"
[
  new Date(Date.UTC(0, 0, 1)).toISOString(),
  new Date(Date.UTC(2026, 0, 1)).toISOString(),
  new Date(Date.UTC(10000, 0, 1)).toISOString(),
].join(",");

ModuleDiamondCircularityAsserts

SpecTec: test262layer: spec

Write-up 66: GetExportedNames and ResolveExport assert circularity on acyclic diamond export * module graphs →

§16.2.1.7.2.1 GetExportedNames, step 3.a

Assert: We've reached the starting point of an export * circularity.

§16.2.1.7.2.2 ResolveExport, step 3.a.i

Assert: This is a circular import request.

Formalization note

Both algorithms pass a single mutable List (_exportStarSet_ / _resolveSet_) across sibling export * branches without popping or copying, so any cycle-free diamond export * DAG (a -> {b, c} -> d) falsifies both circularity Asserts. SpecTec silences both via assert pass in S16.spectec:528, 563 (write-up 66).

In SpecTec
The test262 reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: none found (searched for "starting point of an export * circularity" and "circular import request").

The program tests/run/errata_module_diamond.js, verified with ecma-run --module --checked --module-dir tests/run/modules tests/run/errata_module_diamond.js:

The test262 reading (baked into SpecTec · verified)normal: undefined
  • x,y|1|2
The literal text (alternative reading)stop: assertFailed sec-getexportednames#0 3.a: stops at §16.2.1.7.2.1 GetExportedNames, step 3.a (a failed Assert)
Source
// module: yes
// args: --checked --module-dir tests/run/modules
// expect: normal: undefined
// print: x,y|1|2
import * as ns from "./diamond_a.mjs";
print(Object.keys(ns).join(",") + "|" + ns.x + "|" + ns.y);

MemoryModelRMWCycleAndRbf

SpecTec: proposedlayer: none

Write-up 67: §29 Memory Model: overlapping-RMW ValueOfReadEvent cycle non-termination, unquantified reads-bytes-from, and HostEventSet →

§29.5.4 ComposeWriteEventBytes, step 3.d.ii

Let bytes be ValueOfReadEvent(execution, writeEvent).

§29.7.5 Valid Executions

execution admits a happens-before Relation that is a strict partial order.

§29.6.4 host-synchronizes-with

For a candidate execution execution, its host-synchronizes-with Relation is a host-provided strict partial order on host-specific Memory events that satisfies at least the following.

Formalization note

Unequal overlapping RMWs ([0,2) and [0,4)) are not ordered by §29.6.5 synchronizes-with (which requires equal ranges), allowing a 2-cycle in reads-bytes-from where ValueOfReadEvent ↔ ComposeWriteEventBytes diverges infinitely; §29.7.5 also leaves reads-bytes-from unquantified (since PR #3321), and §29.5.3 HostEventSet includes Synchronize events against §29.6.4. SpecTec (07-memory-model.spectec) defines ValueOf/Compose as an inductive least fixpoint, existentially quantifies rbf, converts Tear Free Reads' Assert to a conjunct, and defines HostSync over inHost (write-up 67).

In SpecTec
The proposed reading.
Layer
Prose relations & unused rows. Applies in the SpecTec prose model (spec/spectec/prose/) or an unreachable grammar row.
Upstream
Checked 2026-11-19: none found for the RMW cycle or HostEventSet domain; PR #3321 (merged 2024-05, commit 1babaf809), "Editorial: Rework memory model relations", removed [[ReadsBytesFrom]] from Candidate Execution Records while leaving reads-bytes-from unquantified in §29.7.5.

No JavaScript program on this site shows this erratum (an axiomatic §29 relation).

WeakRefAllCellsAndSuspendWaiter

SpecTec: proposedlayer: spec

Write-up 68: WeakRef execution single-cell loop, SuspendThisAgent's NotifyWaiter argument, "Canonical property value" column, and metamodel sort gaps →

§9.9.3 Execution, step 1.b

For each FinalizationRegistry finalizationRegistry such that finalizationRegistry.[[Cells]] contains a Record cell such that cell.[[WeakRefTarget]] is value, do

§25.4.3.11 SuspendThisAgent, step 7

another agent calling NotifyWaiter with arguments waiterList and thisAgent

§22.2.2.9.8 UnicodeMatchPropertyValue, step 3

Let value be the canonical property value of v as given in the “Canonical property value” column of the corresponding row.

§16.2.1.5 Abstract Module Records

This specification defines the abstract subclass named Cyclic Module Record and its concrete subclass named Source Text Module Record.

Formalization note

SpecTec bakes in four prose/signature fixes: Cell.Emptied (25-host-laws-changes.spectec) empties all matching FinalizationRegistry cells rather than step 1.b's single _cell_ per registry; $SuspendAgentUntil matches NotifyWaiter's Waiter Record parameter rather than _thisAgent_ (#3328); $CanonicalPropertyValue selects UCD PropertyValueAliases.txt field 3 instead of a nonexistent "Canonical property value" column; and 00-decls.spectec declares super [#"Module Record"] on #"Synthetic Module Record" where §16.2.1.5 omits it (write-up 68).

In SpecTec
The proposed reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: issue #3328 (open, 2024-05), "Typo in step 7 of the SuspendThisAgent abstract operation", reports the NotifyWaiter parameter bug; none found for the FinalizationRegistry single-cell loop, the "Canonical property value" column, or Abstract Module Records omitting Synthetic Module Record (searched for "Canonical property value" and "sole concrete subclass Source Text Module Record").

The program tests/run/errata_weakref_unicode_sorts.js, verified with ecma-run tests/run/errata_weakref_unicode_sorts.js:

The proposed reading (baked into SpecTec · verified)normal: "true,true"
The literal text (alternative reading)stop: residue sec-runtime-semantics-unicodematchpropertyvalue-p-v#0 3: stops at §22.2.2.9.8 UnicodeMatchPropertyValue, step 3 (a step of the text with no reading the machine can run)
Source
// expect: normal: "true,true"
[/\p{gc=Lu}/u.test("A"), /\p{General_Category=Uppercase_Letter}/u.test("A")].join(",");

IfAbruptRejectPromiseInPromiseReturn

SpecTec: literallayer: spec

Write-up 69: Synthetic Module Record.Evaluate and AsyncFromSyncIteratorContinuation expand IfAbruptRejectPromise's ? inside : a Promise operations →

§16.2.1.8.4.5 Evaluate, step 14

IfAbruptRejectPromise(result, promiseCapability).

§27.1.5.4 AsyncFromSyncIteratorContinuation, steps 1, 3, 5, 8

IfAbruptRejectPromise(done, promiseCapability).

§27.5.1.1.1 IfAbruptRejectPromise, step 2.a

Perform ? Call(capability.[[Reject]], undefined, « value.[[Value]] »).

Formalization note

Both Synthetic Module Record.Evaluate (§16.2.1.8.4.5 step 14) and AsyncFromSyncIteratorContinuation (§27.1.5.4 steps 3, 5, 8) declare non-Completion return type a Promise, yet invoke IfAbruptRejectPromise, whose §27.5.1.1.1 / §5.2.4.3 expansion contains Perform ? Call(_capability_.[[Reject]], …) (returning an abrupt Completion Record on throw). SpecTec keeps the literal steps; the proposed reading replaces IfAbruptRejectPromise with ! Call(_promiseCapability_.[[Reject]], …) and Return _promiseCapability_.[[Promise]] (write-up 69).

Read as written
The text never stops a run.
In SpecTec
The literal text.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-12-01: none found (searched for "IfAbruptRejectPromise" with "sec-smr-Evaluate" and "AsyncFromSyncIteratorContinuation").

No JavaScript program on this site shows this erratum (an axiomatic §29 relation).

Proposed normative changes (3)

Not a defect: the text is consistent, and the change alters what it requires (such as finite resource limits for BigInts and Strings or pre-Unicode-15.1 identity escapes).

IdentityEscapeJoinControls

SpecTec: proposedlayer: parser

Write-up 21: /\<ZWNJ>/ and /\<ZWJ>/ became SyntaxErrors with Unicode 15.1 →

§22.2.1 Patterns, the definition of IdentityEscape
IdentityEscape[UnicodeMode] ::
  [+UnicodeMode] SyntaxCharacter
  [+UnicodeMode] `/`
  [~UnicodeMode] SourceCharacter but not UnicodeIDContinue
The proposed reading
IdentityEscape[UnicodeMode] ::
  [+UnicodeMode] SyntaxCharacter
  [+UnicodeMode] `/`
  [~UnicodeMode] SourceCharacter but not UnicodeIDContinue
  [~UnicodeMode] `‌`
  [~UnicodeMode] `‍`

Formalization note

Since Unicode 15.1 added (U+200C) and (U+200D) to ID_Continue, IdentityEscape[~UnicodeMode] :: SourceCharacter but not UnicodeIDContinue makes /\u200C/ and /\u200D/ (with literal ZWNJ/ZWJ) SyntaxErrors outside §B.1.2 without an Annex F record. Because test262's S7.8.5_A1.4_T2.js permits SyntaxError for ID_Continue characters, this is a proposed normative restoration rather than a test262 requirement (write-up 21).

In SpecTec
The proposed reading.
Layer
Grammar & parser. Baked into the SpecTec grammars (spec/spectec/01..07-grammar-*.spectec) and the parser.
Upstream
Checked 2026-11-19: none found (searched for "IdentityEscape"). Issue #3073 (closed, 2024-02), "[Informative] Observable changes because of Unicode 15.1", and PR #3074 (merged 2024-02, commit 467819a42), "Editorial: Remove special-casing of U+200C and U+200D", concern the same two code points; the PR removed <ZWNJ> and <ZWJ> from IdentifierPartChar.

The program tests/run/regexp_identity_escape_join_controls.js, verified with ecma-run tests/run/regexp_identity_escape_join_controls.js:

The proposed reading (baked into SpecTec · verified)normal: undefined
  • U+200C: literal true, class true, a-literal true, RegExp true, u SyntaxError, v SyntaxError
  • U+200D: literal true, class true, a-literal true, RegExp true, u SyntaxError, v SyntaxError
  • U+200B: literal true, class true, a-literal true, RegExp true, u SyntaxError, v SyntaxError
  • U+200E: literal true, class true, a-literal true, RegExp true, u SyntaxError, v SyntaxError
  • U+61: literal SyntaxError, class SyntaxError, a-literal SyntaxError, RegExp SyntaxError, u SyntaxError, v SyntaxError
  • U+B7: literal SyntaxError, class SyntaxError, a-literal SyntaxError, RegExp SyntaxError, u SyntaxError, v SyntaxError
The literal text (alternative reading)normal: undefined
  • U+200C: literal SyntaxError, class SyntaxError, a-literal SyntaxError, RegExp SyntaxError, u SyntaxError, v SyntaxError
  • U+200D: literal SyntaxError, class SyntaxError, a-literal SyntaxError, RegExp SyntaxError, u SyntaxError, v SyntaxError
  • U+200B: literal true, class true, a-literal true, RegExp true, u SyntaxError, v SyntaxError
  • U+200E: literal true, class true, a-literal true, RegExp true, u SyntaxError, v SyntaxError
  • U+61: literal SyntaxError, class SyntaxError, a-literal SyntaxError, RegExp SyntaxError, u SyntaxError, v SyntaxError
  • U+B7: literal SyntaxError, class SyntaxError, a-literal SyntaxError, RegExp SyntaxError, u SyntaxError, v SyntaxError

Cross-engine runs

Source
// Erratum IdentityEscapeJoinControls, at its test262 reading: without the
// u or v flag, `\` U+200C (ZWNJ) and `\` U+200D (ZWJ) are IdentityEscapes,
// as test262's language/literals/regexp/S7.8.5_A1.4_T2.js and
// S7.8.5_A2.4_T2.js require, although Unicode 15.1 made both UnicodeIDContinue.
// ecma-run's default host does not support §B.1.2, so this is the main grammar:
// the other UnicodeIDContinue code points (`a`, U+00B7) stay SyntaxErrors, and
// U+200B and U+200E (not ID_Continue) are IdentityEscapes. The u and v flags
// allow neither. The characters are invisible: the patterns are built with
// fromCharCode.
// expect: normal: undefined
// print: U+200C: literal true, class true, a-literal true, RegExp true, u SyntaxError, v SyntaxError
// print: U+200D: literal true, class true, a-literal true, RegExp true, u SyntaxError, v SyntaxError
// print: U+200B: literal true, class true, a-literal true, RegExp true, u SyntaxError, v SyntaxError
// print: U+200E: literal true, class true, a-literal true, RegExp true, u SyntaxError, v SyntaxError
// print: U+61: literal SyntaxError, class SyntaxError, a-literal SyntaxError, RegExp SyntaxError, u SyntaxError, v SyntaxError
// print: U+B7: literal SyntaxError, class SyntaxError, a-literal SyntaxError, RegExp SyntaxError, u SyntaxError, v SyntaxError
function t(f) { try { return f(); } catch (e) { return e.name; } }
for (var cu of [0x200C, 0x200D, 0x200B, 0x200E, 0x61, 0xB7]) {
  var ch = String.fromCharCode(cu), src = "\\" + ch;
  print("U+" + cu.toString(16).toUpperCase() + ": " + [
    "literal " + t(() => { var re = eval("/" + src + "/"); return re.source === src && re.test(ch) && !re.test("x"); }),
    "class " + t(() => eval("/[" + src + "]/").test(ch)),
    "a-literal " + t(() => eval("/a" + src + "/").test("a" + ch)),
    "RegExp " + t(() => new RegExp(src).exec("x" + ch)[0] === ch),
    "u " + t(() => new RegExp(src, "u")),
    "v " + t(() => new RegExp(src, "v")),
  ].join(", "));
}

BigIntMaximumSize

SpecTec: proposedlayer: spec

Write-up 51: A maximum BigInt size: 2n ** (2n ** 40n) has an exact result in the text, which allows no maximum size →

§6.1.6.2.3 BigInt::exponentiate, step 3

Return base raised to the power exponent.

The proposed reading
  1. If BigIntTooLarge("exponentiate", base, exponent) is true, throw a RangeError exception.
  2. Return base raised to the power exponent.
§6.1.6.2.9 BigInt::leftShift, step 2

Return x × 2ℤy.

The proposed reading
  1. If x is 0ℤ or y is 0ℤ, return x.
  2. If BigIntTooLarge("leftShift", x, y) is true, throw a RangeError exception.
  3. Return x × 2ℤy.
§6.1.6.2.4 BigInt::multiply, step 1

Return x × y.

The proposed reading
  1. If BigIntTooLarge("multiply", x, y) is true, throw a RangeError exception.
  2. Return x × y.
§6.1.6.2.7 BigInt::add, step 1

Return x + y.

The proposed reading
  1. If BigIntTooLarge("add", x, y) is true, throw a RangeError exception.
  2. Return x + y.
§6.1.6.2.8 BigInt::subtract, step 1

Return x - y.

The proposed reading
  1. If BigIntTooLarge("subtract", x, y) is true, throw a RangeError exception.
  2. Return x - y.
§21.2.2.2 BigInt.asUintN, step 3

Return ℤ(ℝ(bigint) modulo 2bits).

The proposed reading
  1. If bits = 0 or bigint is 0ℤ, return 0ℤ.
  2. If bigint > 0ℤ and bits ≥ 4 × (DecimalExponent(ℝ(bigint)) + 1), return bigint.
  3. If BigIntTooLarge("asUintN", bigint, ℤ(bits)) is true, throw a RangeError exception.
  4. Return ℤ(ℝ(bigint) modulo 2bits).

Formalization note

§6.1.6.2 says a BigInt "may be any size and is not limited to a particular bit-width", and BigInt::exponentiate, BigInt::leftShift, BigInt::multiply, BigInt::add, BigInt::subtract and BigInt.asUintN return their exact results whatever their size; every implementation has a maximum size and throws a RangeError past it (V8 at 230 bits). SpecTec checks BigIntTooLarge before forming the result (propagating ? through binary operators, BigInt::signedRightShift, and ++/--; docs/spec-issues/51-bigint-maximum-size.md).

In SpecTec
The proposed reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-19: none found that proposes this (searched for BigInt with "maximum size" and with "size limit"). Related: issue #1391 (open, 2019-01), "Extending defining out-of-memory beyond ArrayBuffer", asks whether BigInt will have a defined out-of-memory error as ArrayBuffer has; issue #4063 (closed, 2026-10, as not planned), "Specify that exceeding resource limits may throw", asked it of resource limits in general.

The program tests/run/bigint_huge_left_shift.js, verified with ecma-run tests/run/bigint_huge_left_shift.js:

The proposed reading (baked into SpecTec · verified)throw: RangeError
The literal text (alternative reading)stop: implLimit sec-numeric-types-bigint-leftShift#0 2..cclxxviii.2: stops at §6.1.6.2.9 BigInt::leftShift, step 2 (inside the reading of that step) (an implementation limit of the engine)

Source
// expect: throw: RangeError
// BigInt::leftShift whose result has more than 2^30 bits throws a RangeError
// (erratum BigIntMaximumSize, proposed reading), not a runtime abort
// (BigInt.shiftLeft).
2n << (1n << 64n);

StringMaximumLength

SpecTec: proposedlayer: spec

Write-up 54: Maximum String length below 2^53 - 1: "a".repeat(2 ** 30) throws a RangeError past host memory limits →

§22.1.3.18 String.prototype.repeat, step 7

Return the String value that is made from n copies of string appended together.

The proposed reading
  1. If StringTooLarge(n × the length of string) is true, throw a RangeError exception.
  2. Return the String value that is made from n copies of string appended together.
§22.1.3.17.1 StringPaddingBuiltinsImpl, step 7

Return StringPad(string, intMaxLength, fillString, placement).

The proposed reading
  1. If fillString is not the empty String and StringTooLarge(intMaxLength) is true, throw a RangeError exception.
  2. Return StringPad(string, intMaxLength, fillString, placement).
§22.1.3.5 String.prototype.concat, step 5.b

Set result to the string-concatenation of result and nextString.

The proposed reading
  1. If StringTooLarge(the length of result + the length of nextString) is true, throw a RangeError exception.
  2. Set result to the string-concatenation of result and nextString.
§13.15.3 ApplyStringOrNumericBinaryOperator, step 1.c.iii

Return the string-concatenation of leftString and rightString.

The proposed reading
  1. If StringTooLarge(the length of leftString + the length of rightString) is true, throw a RangeError exception.
  2. Return the string-concatenation of leftString and rightString.
§23.1.3.18.1 JoinIndexedProperties, step 4.a

If k > 0, set result to the string-concatenation of result and separator.

The proposed reading
  1. If k > 0, then
    1. If StringTooLarge(the length of result + the length of separator) is true, throw a RangeError exception.
    2. Set result to the string-concatenation of result and separator.
§23.1.3.18.1 JoinIndexedProperties, step 4.d.iii

Set result to the string-concatenation of result and elementString.

The proposed reading
  1. If StringTooLarge(the length of result + the length of elementString) is true, throw a RangeError exception.
  2. Set result to the string-concatenation of result and elementString.

Formalization note

Even below §6.1.4's 253 - 1 ceiling, every engine enforces a smaller finite-memory maximum String length and throws a RangeError past it (V8 228 on 32-bit and 229 - 24 on 64-bit, SpiderMonkey 230 - 2, JavaScriptCore 231 - 1). SpecTec asks the host via StringTooLarge (answering true past 228 code units in Engine) and throws a RangeError (write-up 54).

In SpecTec
The proposed reading.
Layer
Algorithm & early-error SpecTec. Baked directly into the clause or early-error rules of spec/spectec/.
Upstream
Checked 2026-11-20: none found that specifies an implementation-defined sub-2^53 - 1 maximum String length throw (searched for String with "maximum length" and "RangeError"). Related: issue #4063 (closed, 2026-10), "Specify that exceeding resource limits may throw".

The program tests/run/errata_string_maximum_length.js, verified with ecma-run tests/run/errata_string_maximum_length.js:

The proposed reading (baked into SpecTec · verified)normal: "RangeError,0,RangeError,a"
The literal text (alternative reading)stop: implLimit sec-string.prototype.repeat#0 7: stops at §22.1.3.18 String.prototype.repeat, step 7 (an implementation limit of the engine)
Source
// expect: normal: "RangeError,0,RangeError,a"
let out = [];
try { "a".repeat(2 ** 30); out.push("ok"); } catch (e) { out.push(e.name); }
out.push("".repeat(2 ** 40).length);
try { "a".padStart(2 ** 30, "b"); out.push("ok"); } catch (e) { out.push(e.name); }
out.push("a".padStart(2 ** 32, ""));
out.join(",");