{"record":{"id":"87f963cdca75097f","repo":"wasmerio/wasmer","slug":"eh-pointer-encoding-eh-pe-not-supported-for-sy","errorCode":null,"errorMessage":"eh pointer encoding {eh_pe:?} not supported for symbol targets","messagePattern":"eh pointer encoding (.+?) not supported for symbol targets","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/compiler-cranelift/src/dwarf.rs","lineNumber":151,"sourceCode":"                    unreachable!(\"Symbol {} in DWARF not recognized\", symbol);\n                }\n            }\n        }\n    }\n\n    fn write_eh_pointer(\n        &mut self,\n        address: Address,\n        eh_pe: constants::DwEhPe,\n        size: u8,\n    ) -> Result<()> {\n        if eh_pe == constants::DW_EH_PE_absptr {\n            self.write_address(address, size)\n        } else {\n            match address {\n                Address::Constant(_) => self.writer.write_eh_pointer(address, eh_pe, size),\n                Address::Symbol { .. } => {\n                    unimplemented!(\"eh pointer encoding {eh_pe:?} not supported for symbol targets\")\n                }\n            }\n        }\n    }\n\n    fn write_offset(&mut self, _val: usize, _section: SectionId, _size: u8) -> Result<()> {\n        unimplemented!(\"write_offset not yet implemented\");\n    }\n\n    fn write_offset_at(\n        &mut self,\n        _offset: usize,\n        _val: usize,\n        _section: SectionId,\n        _size: u8,\n    ) -> Result<()> {\n        unimplemented!(\"write_offset_at not yet implemented\");\n    }","sourceCodeStart":133,"sourceCodeEnd":169,"githubUrl":"https://github.com/wasmerio/wasmer/blob/8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5/lib/compiler-cranelift/src/dwarf.rs#L133-L169","documentation":"In the cranelift DWARF/EH-frame writer, non-absolute eh pointer encodings (DW_EH_PE_*) can only be applied to Address::Constant; when the pointer refers to a symbol and the encoding is anything other than DW_EH_PE_absptr, the writer panics with unimplemented!() because relative/pcrel encodings for symbol targets are not implemented.","triggerScenarios":"write_eh_pointer receives Address::Symbol with an eh_pe encoding other than DW_EH_PE_absptr while emitting .eh_frame (personality or LSDA pointers) for a module compiled with cranelift and EH info.","commonSituations":"Compiling wasm exception-handling modules where the gimli dwarf writer selects a relative encoding (e.g. DW_EH_PE_pcrel/sdata4) for symbol references; using targets whose CFI conventions require relative encodings.","solutions":["Update Wasmer to the latest version","Use DW_EH_PE_absptr-compatible targets (mainstream Linux x86_64/aarch64)","Disable EH/unwind-info generation or strip wasm EH from the module","Use the LLVM backend, which supports the full range of EH pointer encodings"],"exampleFix":"// before\nAddress::Symbol { .. } => {\n    unimplemented!(\"eh pointer encoding {eh_pe:?} not supported for symbol targets\")\n}\n// after\nAddress::Symbol { .. } => {\n    return Err(CompileError::Codegen(format!(\"eh pointer encoding {eh_pe:?} not supported for symbol targets\")));\n}","handlingStrategy":"validation","validationCode":"// Only DW_EH_PE_absptr is supported for symbol targets in cranelift\nfn symbol_target_supported(eh_pe: gimli::constants::DwEhPe) -> bool {\n    eh_pe == gimli::constants::DW_EH_PE_absptr\n}","typeGuard":"fn is_absptr(eh_pe: gimli::constants::DwEhPe) -> bool { eh_pe == gimli::constants::DW_EH_PE_absptr }","tryCatchPattern":null,"preventionTips":["Compile EH modules only on targets whose CFI conventions use absolute encodings","Use LLVM backend for relative-encoding targets","Disable EH/unwind info for experimental targets","Watch Wasmer releases for expanded eh-pointer encoding support"],"tags":["rust","cranelift","dwarf","eh-frame","unimplemented"],"backgroundTag":"unimplemented-dwarf-relocation","analyzedSha":"8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5","analyzedAt":"2026-09-01T23:06:31.009Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}