{"record":{"id":"01bc9514b269ae0e","repo":"wasmerio/wasmer","slug":"relocations-to-offset-in-the-same-function-are-not","errorCode":null,"errorMessage":"relocations to offset in the same function are not yet supported","messagePattern":"relocations to offset in the same function are not yet supported","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/compiler-cranelift/src/compiler.rs","lineNumber":804,"sourceCode":"        )\n    }\n}\n\nfn mach_reloc_to_reloc(\n    module: &ModuleInfo,\n    func_index_map: &cranelift_entity::PrimaryMap<ir::UserExternalNameRef, ir::UserExternalName>,\n    reloc: &FinalizedMachReloc,\n) -> Relocation {\n    let FinalizedMachReloc {\n        offset,\n        kind,\n        addend,\n        target,\n    } = &reloc;\n    let name = match target {\n        FinalizedRelocTarget::ExternalName(external_name) => external_name,\n        FinalizedRelocTarget::Func(_) => {\n            unimplemented!(\"relocations to offset in the same function are not yet supported\")\n        }\n    };\n    let reloc_target: RelocationTarget = if let ExternalName::User(extname_ref) = name {\n        let func_index = func_index_map[*extname_ref].index;\n        //debug_assert_eq!(namespace, 0);\n        RelocationTarget::LocalFunc(\n            module\n                .local_func_index(FunctionIndex::from_u32(func_index))\n                .expect(\"The provided function should be local\"),\n        )\n    } else if let ExternalName::LibCall(libcall) = name {\n        RelocationTarget::LibCall(irlibcall_to_libcall(*libcall))\n    } else {\n        panic!(\"unrecognized external target\")\n    };\n    Relocation {\n        kind: irreloc_to_relocationkind(*kind),\n        reloc_target,","sourceCodeStart":786,"sourceCodeEnd":822,"githubUrl":"https://github.com/wasmerio/wasmer/blob/8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5/lib/compiler-cranelift/src/compiler.rs#L786-L822","documentation":"Error \"relocations to offset in the same function are not yet supported\" thrown in wasmerio/wasmer.","triggerScenarios":"Thrown at lib/compiler-cranelift/src/compiler.rs:804 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5","analyzedAt":"2026-09-01T23:06:31.009Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}