Skip to content

Use JITModule::get_address for rust_eh_personality when relocating unwind tables for jit mode #1671

Description

@bjorn3

This will require the next Cranelift release: bytecodealliance/wasmtime#13789

// FIXME make JITModule::get_address public and use it here instead.
// HACK rust_eh_personality is likely not defined in the same crate,
// so get_finalized_function won't work. Use the rust_eh_personality
// of cg_clif itself, which is likely ABI compatible.
if jit_module.declarations().get_function_decl(func_id).name.as_deref()
== Some("rust_eh_personality")
{
unsafe extern "C" {
fn rust_eh_personality() -> !;
}
rust_eh_personality as *const u8

This is required for mangling the rust_eh_personality symbol name in the future.

Metadata

Metadata

Assignees

Labels

A-jitArea: JIT compilationA-unwindArea: UnwindingC-cleanupCategory: PRs that clean code up or issues documenting cleanup.S-blockedStatus: marked as blocked ❌ on something else such as an RFC or other implementation work.

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions