Stream: git-wasmtime

Topic: wasmtime / PR #13383 cranelift-object: emit .eh_frame for...


view this post on Zulip Wasmtime GitHub notifications bot (May 15 2026 at 05:02):

HueCodes opened PR #13383 from HueCodes:feat/eh-frame-emission to bytecodealliance:main:

Add ObjectBuilder::unwind_info(bool). When enabled, the emitted object gains a .eh_frame section with one shared CIE and one FDE per defined function, relocated against the function symbols.

The implementation routes cranelift-codegen's existing UnwindInfo::SystemV through gimli's RelocateWriter into an object-crate section. Off by default. Supported on ELF and COFF; Mach-O and Windows unwind formats are deferred and currently no-op or error rather than emit wrong data.

Closes #1282.

view this post on Zulip Wasmtime GitHub notifications bot (May 15 2026 at 05:02):

HueCodes requested cfallin for a review on PR #13383.

view this post on Zulip Wasmtime GitHub notifications bot (May 15 2026 at 05:02):

HueCodes requested wasmtime-compiler-reviewers for a review on PR #13383.

view this post on Zulip Wasmtime GitHub notifications bot (May 15 2026 at 05:02):

HueCodes requested fitzgen for a review on PR #13383.

view this post on Zulip Wasmtime GitHub notifications bot (May 15 2026 at 05:02):

HueCodes requested wasmtime-default-reviewers for a review on PR #13383.

view this post on Zulip Wasmtime GitHub notifications bot (May 15 2026 at 10:09):

bjorn3 commented on PR #13383:

Maybe put this behind a feature flag? This wouldn't be usable for rustc_codegen_cranelift as it doesn't allow writing an LSDA.

On arm64 Mach-O it should be possible to emit __TEXT,__eh_frame by the way: https://github.com/rust-lang/rustc_codegen_cranelift/pull/1634

view this post on Zulip Wasmtime GitHub notifications bot (May 15 2026 at 13:14):

github-actions[bot] added the label cranelift:module on PR #13383.

view this post on Zulip Wasmtime GitHub notifications bot (May 15 2026 at 13:14):

github-actions[bot] added the label cranelift on PR #13383.

view this post on Zulip Wasmtime GitHub notifications bot (May 15 2026 at 19:40):

HueCodes updated PR #13383.

view this post on Zulip Wasmtime GitHub notifications bot (May 15 2026 at 19:44):

HueCodes commented on PR #13383:

@bjorn3 thanks. Done: default-on "unwind" Cargo feature mirroring cranelift-codegen's "unwind", with gimli and ObjectBuilder::unwind_info both gated behind it, so cg_clif drops the dep and API via default-features = false. Kept Mach-O scoped out for now (wrong-reloc risk); TODO left pointing at
cg_clif#1634.

view this post on Zulip Wasmtime GitHub notifications bot (May 18 2026 at 17:08):

:memo: fitzgen submitted PR review:

Thanks! I think we could clean up the boundary between cfg(feature = "unwind") vs cfg(not(feature = "unwind")) a bit.

view this post on Zulip Wasmtime GitHub notifications bot (May 18 2026 at 17:08):

:speech_balloon: fitzgen created PR review comment:

I think this will emit dead code warnings when built without the unwind feature. Will want to #[cfg(feature = "unwind")] on this.

view this post on Zulip Wasmtime GitHub notifications bot (May 18 2026 at 17:08):

:speech_balloon: fitzgen created PR review comment:

And here

view this post on Zulip Wasmtime GitHub notifications bot (May 18 2026 at 17:08):

:speech_balloon: fitzgen created PR review comment:

And here

view this post on Zulip Wasmtime GitHub notifications bot (May 18 2026 at 17:08):

:speech_balloon: fitzgen created PR review comment:

Yeah better to avoid this by moving the #[cfg(feature = "unwind")] "up" and avoiding this whole module or any calls into it when the feature is disabled.

view this post on Zulip Wasmtime GitHub notifications bot (May 18 2026 at 17:08):

:speech_balloon: fitzgen created PR review comment:

And here

view this post on Zulip Wasmtime GitHub notifications bot (May 18 2026 at 17:08):

:speech_balloon: fitzgen created PR review comment:

And we also don't want to build any of this module unless #[cfg(feature = "unwind")].

view this post on Zulip Wasmtime GitHub notifications bot (May 20 2026 at 03:15):

HueCodes updated PR #13383.

view this post on Zulip Wasmtime GitHub notifications bot (May 20 2026 at 03:17):

HueCodes commented on PR #13383:

@fitzgen thanks! Changes made: stub gone, #[cfg(feature = "unwind")] lifted to the field decls, struct init,
and call sites. No cfg(not(feature = "unwind")) branch left.

view this post on Zulip Wasmtime GitHub notifications bot (May 20 2026 at 16:26):

:thumbs_up: fitzgen submitted PR review:

Thanks!

view this post on Zulip Wasmtime GitHub notifications bot (May 20 2026 at 16:26):

fitzgen added PR #13383 cranelift-object: emit .eh_frame for System V unwind info to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (May 20 2026 at 16:53):

:check: fitzgen merged PR #13383.

view this post on Zulip Wasmtime GitHub notifications bot (May 20 2026 at 16:53):

fitzgen removed PR #13383 cranelift-object: emit .eh_frame for System V unwind info from the merge queue.


Last updated: Jun 01 2026 at 09:49 UTC