Skip to content

Normative: Do not read from empty [[CycleRoot]] in GatherAvailableAncestors#3769

Open
nicolo-ribaudo wants to merge 2 commits intotc39:mainfrom
nicolo-ribaudo:empty-cycle-root
Open

Normative: Do not read from empty [[CycleRoot]] in GatherAvailableAncestors#3769
nicolo-ribaudo wants to merge 2 commits intotc39:mainfrom
nicolo-ribaudo:empty-cycle-root

Conversation

@nicolo-ribaudo
Copy link
Copy Markdown
Member

Fixes #3766. See #3766 (comment) for a more detailed analysis.

Marking this as normative as we did for #3583, but (same as for that PR) this is aligning the spec with the commitee's desired behavior and thus does not need explicit consensus.

I checked V8's ans SM's implementations after writing this patch, and it seems like SM does exactly what this spec change does. V8 has a different but equivalent approach (it checks that the [[CycleRoot]] is not empty, and asserts that it being empty implies that the module errored, cc @o-).

cc @heimskr for your WebKit module loader rewrite.

@nicolo-ribaudo nicolo-ribaudo added normative change Affects behavior required to correctly evaluate some ECMAScript source text spec bug labels Mar 18, 2026
@github-actions
Copy link
Copy Markdown

The rendered spec for this PR is available as a single page at https://tc39.es/ecma262/pr/3769 and as multiple pages at https://tc39.es/ecma262/pr/3769/multipage .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

normative change Affects behavior required to correctly evaluate some ECMAScript source text spec bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

m.[[CycleRoot]] can be null in GatherAvailableAncestors

2 participants