diff --git a/crates/runtime/src/traphandlers.rs b/crates/runtime/src/traphandlers.rs index 9ec38ba872..aaf6f8a586 100644 --- a/crates/runtime/src/traphandlers.rs +++ b/crates/runtime/src/traphandlers.rs @@ -158,6 +158,9 @@ cfg_if::cfg_if! { if #[cfg(all(target_os = "linux", target_arch = "x86_64"))] { let cx = &*(cx as *const libc::ucontext_t); cx.uc_mcontext.gregs[libc::REG_RIP as usize] as *const u8 + } else if #[cfg(all(target_os = "linux", target_arch = "x86"))] { + let cx = &*(cx as *const libc::ucontext_t); + cx.uc_mcontext.gregs[libc::REG_EIP as usize] as *const u8 } else if #[cfg(all(target_os = "linux", target_arch = "aarch64"))] { // libc doesn't seem to support Linux/aarch64 at the moment? extern "C" {