Skip to content

task core: CM#705 reentrance residue — subtask.cancel claim window, mid-hop reads, wrapped-implies-marked (#279) - #282

Merged
lannbot merged 1 commit into
mainfrom
fix-279-cm705-reentrance
Sep 5, 2026
Merged

task core: CM#705 reentrance residue — subtask.cancel claim window, mid-hop reads, wrapped-implies-marked (#279)#282
lannbot merged 1 commit into
mainfrom
fix-279-cm705-reentrance

Conversation

@lannbot

@lannbot lannbot commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

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.

…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.
@lannbot
lannbot enabled auto-merge September 5, 2026 04:19
@lannbot
lannbot merged commit 737d1e2 into main Sep 5, 2026
3 checks passed
@lannbot
lannbot deleted the fix-279-cm705-reentrance branch September 5, 2026 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

adopt CM#705 reentrance semantics: reentrance.wast rows 429/517/837 (post-FACT-stub residue)

2 participants