task core: CM#705 reentrance residue — subtask.cancel claim window, mid-hop reads, wrapped-implies-marked (#279) - #282
Merged
Conversation
…id-hop reads, wrapped-implies-marked (#279) Three reentrance.wast rows the retired FACT stub used to mask: - :837 — `canon_subtask_cancel` sets `has_sync_waiter` BEFORE `on_cancel()` for both forms, so a reentrant `waitable.join` on the subtask traps; ours set it only inside the sync blocking branch. Also aligned `trap_if(subtask.in_waitable_set())` to the reference (unconditional) and the two trap texts to the suite's wording. - :517 — under jspi, `subtask.cancel` read the callee's state while its cancelled thread was still mid-microtask-hop (resolved, but still holding the exclusive slot), so the next cancel saw the instance excluded and reported BLOCKED. Both forms now park until the callee is determinate (threads done or parked) — `resolved()` alone is not sufficient — through one shared park replacing the duplicated async branch. - :429 — `$MC` imported only `b`'s `async-start-call` (Suspending-wrapped but deliberately not marking its importer), so it had no promising entry and the wrap tripped jspi pin (c) with SuspendError before any deadlock verdict. Wrapped now implies marked, as a second evidence tier (`wrapFuncs`) that gives guest modules a promising entry without promoting FACT adapter pass-throughs (which regressed drop-subtask.wast:140 under a seed). intrinsics.md and jspi/bridge.ts updated to the new rule. Conformance 1284/0 (+3); the `cm705-reentrance` xfail class is retired. Closes #279.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three reentrance.wast rows the retired FACT stub used to mask:
canon_subtask_cancelsetshas_sync_waiterBEFOREon_cancel()for both forms, so a reentrant
waitable.joinon the subtask traps;ours set it only inside the sync blocking branch. Also aligned
trap_if(subtask.in_waitable_set())to the reference (unconditional)and the two trap texts to the suite's wording.
subtask.cancelread the callee's state while itscancelled thread was still mid-microtask-hop (resolved, but still
holding the exclusive slot), so the next cancel saw the instance
excluded and reported BLOCKED. Both forms now park until the callee is
determinate (threads done or parked) —
resolved()alone is notsufficient — through one shared park replacing the duplicated async
branch.
$MCimported onlyb'sasync-start-call(Suspending-wrappedbut deliberately not marking its importer), so it had no promising
entry and the wrap tripped jspi pin (c) with SuspendError before any
deadlock verdict. Wrapped now implies marked, as a second evidence
tier (
wrapFuncs) that gives guest modules a promising entry withoutpromoting FACT adapter pass-throughs (which regressed
drop-subtask.wast:140 under a seed). intrinsics.md and jspi/bridge.ts
updated to the new rule.
Conformance 1284/0 (+3); the
cm705-reentrancexfail class is retired.Closes #279.