Skip to content

Commit 491af71

Browse files
committed
fix: call unload_process_handler only if supported by the platform.
1 parent dc170ba commit 491af71

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lib/src/wasm/mod.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,15 @@ pub(crate) fn get_engine<'a>() -> &'a Engine {
798798
/// to undefined behavior.
799799
pub(crate) unsafe fn free_engine() {
800800
#[allow(static_mut_refs)]
801-
ENGINE.take().unwrap().unload_process_handlers()
801+
#[cfg(any(
802+
target_arch = "x86_64",
803+
target_arch = "aarch64",
804+
target_arch = "riscv64",
805+
target_arch = "s390x",
806+
))]
807+
{
808+
ENGINE.take().unwrap().unload_process_handlers()
809+
}
802810
}
803811

804812
pub(crate) fn new_linker() -> Linker<ScanContext<'static, 'static>> {

0 commit comments

Comments
 (0)