Skip to content

Comments

Signal handling for non-Python WASM modules#6098

Draft
logan-gatlin wants to merge 4 commits intocloudflare:mainfrom
logan-gatlin:logan/wasm-signal-handling
Draft

Signal handling for non-Python WASM modules#6098
logan-gatlin wants to merge 4 commits intocloudflare:mainfrom
logan-gatlin:logan/wasm-signal-handling

Conversation

@logan-gatlin
Copy link

@logan-gatlin logan-gatlin commented Feb 17, 2026

Adds a shim around WebAssembly.Instance and WebAssembly.instantiate which checks for signal handling capabilities. If present, grab a reference to the module's linear memory, and pass along signals to it. Currently the only supported signals are a CPU limit warning (sent from the host) and a termination notice (set by the module to indicate it has aborted).

In order to receive signals, a module must export a global i32 address called "signal_address_v1" into linear memory, and either import or export a memory called "memory". The CPU limit warning is at signal_address_v1[0], while the termination notice is expected to be at signal_address_v1[1].

@github-actions
Copy link

github-actions bot commented Feb 17, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@logan-gatlin logan-gatlin force-pushed the logan/wasm-signal-handling branch from c442aec to 4eff7fd Compare February 19, 2026 17:44
@logan-gatlin
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Feb 19, 2026
@logan-gatlin
Copy link
Author

logan-gatlin commented Feb 20, 2026

Looks like rebase messed up the history

EDIT: fixed

@logan-gatlin logan-gatlin force-pushed the logan/wasm-signal-handling branch from adfa176 to 6a6837b Compare February 20, 2026 19:23
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 20, 2026

Merging this PR will not alter performance

✅ 70 untouched benchmarks
⏩ 129 skipped benchmarks1


Comparing logan-gatlin:logan/wasm-signal-handling (544048a) with main (02c8669)

Open in CodSpeed

Footnotes

  1. 129 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant