{"record":{"id":"006bb6fcf9f34912","repo":"wasmerio/wasmer","slug":"write-offset-not-yet-implemented-006bb6","errorCode":null,"errorMessage":"write_offset not yet implemented","messagePattern":"write_offset not yet implemented","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/compiler-singlepass/src/dwarf.rs","lineNumber":94,"sourceCode":"                        _ => unimplemented!(\"dwarf relocation size not yet supported: {}\", size),\n                    };\n                    let addend = 0;\n                    self.relocs.push(Relocation {\n                        kind,\n                        reloc_target,\n                        offset,\n                        addend,\n                    });\n                    self.write_udata(addend as u64, size)\n                } else {\n                    unreachable!(\"Symbol {} in DWARF not recognized\", symbol);\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    }\n}\n","sourceCodeStart":76,"sourceCodeEnd":107,"githubUrl":"https://github.com/wasmerio/wasmer/blob/8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5/lib/compiler-singlepass/src/dwarf.rs#L76-L107","documentation":"Stub gimli::Writer::write_offset in the singlepass DWARF writer: emitting a section-relative offset is not implemented and panics, meaning full DWARF debug sections are not supported by the singlepass backend.","triggerScenarios":"Any DWARF-emission path (e.g. .debug_info construction) that calls write_offset while compiling with the singlepass backend.","commonSituations":"Requesting full debug-info generation with singlepass; tooling that writes debug sections rather than just eh_frame.","solutions":["Avoid DWARF debug-section generation with singlepass","Use the LLVM backend for debug info","Update Wasmer to check for newer DWARF support","Implement write_offset in lib/compiler-singlepass/src/dwarf.rs in a fork"],"exampleFix":"// before\nfn write_offset(&mut self, _val: usize, _section: SectionId, _size: u8) -> Result<()> {\n    unimplemented!(\"write_offset not yet implemented\");\n}\n// after\nfn write_offset(&mut self, val: usize, _section: SectionId, size: u8) -> Result<()> {\n    self.write_udata(val, size); // or return a proper unsupported error\n    Ok(())\n}","handlingStrategy":"fallback","validationCode":"// Full DWARF sections are not supported by singlepass — pick LLVM\nlet backend = if needs_debug_info { Backend::LLVM } else { Backend::Singlepass };","typeGuard":null,"tryCatchPattern":"// unimplemented!() panics are not catchable; select the LLVM backend for DWARF workloads instead","preventionTips":["Never request DWARF debug sections with singlepass","Use LLVM for debug info","Limit singlepass to production hot-path compilation without debug info","Assert backend/debug-flag compatibility in your build script"],"tags":["rust","singlepass","dwarf","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"}