The Wire · Showcase
WASM EXCEPTION HANDLING LANDS IN DOTNET RUNTIME
By RepoJournal · Filed · About .NET
The .NET runtime shipped R2R infrastructure for WebAssembly exception handling, unblocking finally clauses and catch bodies in compiled Wasm code.
This is the infrastructure milestone the Wasm team has been building toward. Add Wasm EH R2R infrastructure [1] delivers runtime and JIT support for exception flow in ReadyToRun scenarios, including exports for RtlRestoreContext tags and new relocation types. Finally clauses and catch execution both work; resume-after-catch still needs additional JIT changes, but the foundation is solid. The stack includes a critical fix [8] that corrects argument ordering in InterpToR2R thunks (this before retbuf), which was causing synchronized struct returns to crash. On the optimization front, JIT now forward-substitutes cheap address temps with multiple uses [5], eliminating spill blockers in Lowering and unlocking address-mode containment. LLVM continues its parallel work: Xtensa ESP32S2 support ships [2], clang-tidy gains smarter overload detection [3] to avoid conflicting rewrites, and AMDGPU gfx1251 cost modeling lands [4]. One housekeeping note: Mariner platform detection removed [6] as early Azure Linux versions are no longer supported. A revert [7] pulled back interpreter native EH work that wasn't stable enough.
Action items
- → Test Wasm exception handling in your R2R builds - finally and catch are now live dotnet/runtime [immediate]
- → Pull latest JIT changes if you're optimizing address-mode containment in lowering dotnet/runtime [plan]
- → Remove any IsMariner platform checks from your code dotnet/runtime [plan]
References
- [1] Add Wasm EH R2R infrastructure ↗ dotnet/runtime
- [2] [Xtensa] Implement support of the ESP32S2 target. ↗ dotnet/llvm-project
- [3] [clang-tidy] Avoid non-const-parameter fix-it conflicts with overloads ↗ dotnet/llvm-project
- [4] [AMDGPU] gfx1251 cost model ↗ dotnet/llvm-project
- [5] JIT: forward-sub cheap address temps with multiple uses ↗ dotnet/runtime
- [6] Delete PlatformDetection.IsMariner (#129370) dotnet/runtime
- [7] Revert "Resume after catch for interpreter via native EH" ↗ dotnet/runtime
- [8] Wasm R2R: push this before retbuf in InterpToR2R thunk args (#129356) dotnet/runtime
FAQ
- What changed in .NET on June 14, 2026?
- The .NET runtime shipped R2R infrastructure for WebAssembly exception handling, unblocking finally clauses and catch bodies in compiled Wasm code.
- What should .NET teams do about it?
- Test Wasm exception handling in your R2R builds - finally and catch are now live • Pull latest JIT changes if you're optimizing address-mode containment in lowering • Remove any IsMariner platform checks from your code
- Which .NET repositories shipped on June 14, 2026?
- dotnet/runtime, dotnet/llvm-project