Stream: git-wasmtime

Topic: wasmtime / issue #5574 Emit unwind info in cranelift-jit


view this post on Zulip Wasmtime GitHub notifications bot (Jan 14 2023 at 17:08):

Kixiron opened issue #5574:

It seems like all the infra for unwinding already exists, I'm just not entirely sure how to access it through cranelift-jit to allow unwinding from jit'd code

view this post on Zulip Wasmtime GitHub notifications bot (Jan 14 2023 at 17:34):

bjorn3 commented on issue #5574:

Cranelift doesn't actually know how to emit and relocate DWARF debuginfo, only how produce gimli::write::FrameDescriptorEntry's. See https://github.com/bjorn3/rustc_codegen_cranelift/blob/b31b74e8fb45800e9f86c84b1f78e36bf76c498c/src/debuginfo/unwind.rs#L84-L132 for an example how to register the debuginfo and https://github.com/bjorn3/rustc_codegen_cranelift/blob/b31b74e8fb45800e9f86c84b1f78e36bf76c498c/src/debuginfo/emit.rs#L69-L85 for how to relocate it. Also make sure that cie.fde_address_encoding is some kind of absolute pointer (the default) and not a pcrel one, like necessary for object files.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 06 2023 at 17:29):

Kixiron closed issue #5574:

It seems like all the infra for unwinding already exists, I'm just not entirely sure how to access it through cranelift-jit to allow unwinding from jit'd code

view this post on Zulip Wasmtime GitHub notifications bot (Apr 06 2023 at 17:30):

Kixiron reopened issue #5574:

It seems like all the infra for unwinding already exists, I'm just not entirely sure how to access it through cranelift-jit to allow unwinding from jit'd code

view this post on Zulip Wasmtime GitHub notifications bot (Apr 06 2023 at 17:31):

Kixiron commented on issue #5574:

@bjorn3 That's cfg'd to do nothing on windows, how would I emit unwind info on windows?

view this post on Zulip Wasmtime GitHub notifications bot (Apr 06 2023 at 17:32):

bjorn3 commented on issue #5574:

Looks like https://github.com/bytecodealliance/wasmtime/blob/5ba0d696b7526433c19dd66a134bfb4c8b3e5cc1/crates/jit/src/unwind/winx64.rs has code that does this on windows.


Last updated: Oct 23 2024 at 20:03 UTC