{"record":{"id":"41fa5abc9b80a969","repo":"wasmerio/wasmer","slug":"not-supported-yet","errorCode":null,"errorMessage":"Not supported yet","messagePattern":"Not supported yet","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/compiler/src/object/module.rs","lineNumber":485,"sourceCode":"                                symbol: hi_symbol,\n                                addend: 0,\n                            },\n                        )\n                        .map_err(ObjectError::Write)?;\n                    } else {\n                        obj.add_relocation(\n                            section_id,\n                            Relocation {\n                                offset: relocation_address,\n                                flags: relocation_flags,\n                                symbol: *target_symbol,\n                                addend: r.addend,\n                            },\n                        )\n                        .map_err(ObjectError::Write)?;\n                    }\n                }\n                RelocationTarget::DynamicTrampoline(_) => todo!(\"Not supported yet\"),\n                RelocationTarget::LibCall(libcall) => {\n                    let mut libcall_fn_name = libcall.to_function_name().to_string();\n                    if matches!(triple.binary_format, BinaryFormat::Macho) {\n                        libcall_fn_name = format!(\"_{libcall_fn_name}\");\n                    }\n\n                    let libcall_fn_name = libcall_fn_name.as_bytes();\n\n                    // We add the symbols lazily as we see them\n                    let target_symbol = obj.symbol_id(libcall_fn_name).unwrap_or_else(|| {\n                        obj.add_symbol(ObjSymbol {\n                            name: libcall_fn_name.to_vec(),\n                            value: 0,\n                            size: 0,\n                            kind: SymbolKind::Unknown,\n                            scope: SymbolScope::Unknown,\n                            weak: false,\n                            section: SymbolSection::Undefined,","sourceCodeStart":467,"sourceCodeEnd":503,"githubUrl":"https://github.com/wasmerio/wasmer/blob/8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5/lib/compiler/src/object/module.rs#L467-L503","documentation":"During object-file emission for AOT/engines that produce a native object, `RelocationTarget::DynamicTrampoline` relocations are simply not handled: emit_compilation hits `todo!(\"Not supported yet\")`. The serializer can write LibCall and function-local relocations but has no strategy for dynamic trampolines yet.","triggerScenarios":"Calling generate_object/serialize an Artifact with a compilation whose relocation set contains a DynamicTrampoline target — i.e. serializing a compiled module that references dynamically-registered trampolines, on lib/compiler/src/object/module.rs emit_compilation.","commonSituations":"Using wasmer's object serialization (wasmer serialize / AOT artifact generation) with engine features that install dynamic trampolines (e.g. imported-function trampolines, host-extern stubs); switching engines or features so compiled code acquires such relocations.","solutions":["Avoid serializing artifacts whose relocations include DynamicTrampoline targets; compile/serialize with settings that keep calls as LibCall relocations","Use an engine combination (e.g. Dylib/Universal without dynamic trampolines) supported by the object emitter","Upgrade wasmer — check whether DynamicTrampoline object emission has been implemented","For maintainers: implement the arm by emitting a relocation against the trampoline symbol"],"exampleFix":"// before\nRelocationTarget::DynamicTrampoline(_) => todo!(\"Not supported yet\"),\n// after\nRelocationTarget::DynamicTrampoline(idx) => {\n    let sym = format!(\"__trampoline_{idx}\");\n    self.emit_reloc(obj, reloc, &sym, r.addend).map_err(ObjectError::Write)?;\n}","handlingStrategy":"try-catch","validationCode":"// inspect artifact relocations before serializing\nfn has_dynamic_trampoline_relocs(relocs: &[Relocation]) -> bool {\n    relocs.iter().any(|r| matches!(r.target, RelocationTarget::DynamicTrampoline(_)))\n}","typeGuard":"fn reloc_is_serializable(r: &Relocation) -> bool {\n    !matches!(r.target, RelocationTarget::DynamicTrampoline(_))\n}","tryCatchPattern":"match serialize_result {\n    Err(serde_err) if format!(\"{:?}\", serde_err).contains(\"Not supported yet\") =>\n        // recompile with settings that avoid dynamic trampolines or fall back to in-memory artifact\n        fallback_to_universal_artifact(),\n    Err(e) => return Err(e),\n    Ok(a) => Ok(a),\n}","preventionTips":["Avoid serialize/AOT artifact flows with engine configurations that create dynamic trampolines","Prefer Universal/Dylib engines for serializable artifacts on affected wasmer versions","Test serialization of each module kind in CI before enabling AOT pipelines","Upgrade wasmer to a version implementing DynamicTrampoline emission"],"tags":["aot","relocation","serialization"],"backgroundTag":"unsupported-relocation-target","analyzedSha":"8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5","analyzedAt":"2026-09-01T23:06:31.009Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}