{"record":{"id":"06d2abd67b5a3934","repo":"go-delve/delve","slug":"error-loading-binary-info-from-go-runtime-v","errorCode":null,"errorMessage":"error loading binary info from Go runtime: %v","messagePattern":"error loading binary info from Go runtime: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/proc/bininfo.go","lineNumber":2362,"sourceCode":"\t\t\t\tsec.Name = longname\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n}\n\n// GO RUNTIME INFO ////////////////////////////////////////////////////////////\n\n// loadBinaryInfoGoRuntimeElf loads information from the Go runtime sections\n// of an ELF binary, it is only called when debug info has been stripped.\nfunc loadBinaryInfoGoRuntimeElf(bi *BinaryInfo, image *Image, path string, elfFile *elf.File) (err error) {\n\t// This is a best-effort procedure, it can go wrong in unexpected ways, so\n\t// recover all panics.\n\tdefer func() {\n\t\tierr := recover()\n\t\tif ierr != nil {\n\t\t\tlogflags.Bug.Inc()\n\t\t\terr = fmt.Errorf(\"error loading binary info from Go runtime: %v\", ierr)\n\t\t}\n\t}()\n\n\tcu := &compileUnit{}\n\tcu.image = image\n\tsymTable, symTabAddr, err := readPcLnTableElf(elfFile, path)\n\tif err != nil {\n\t\treturn err\n\t}\n\timage.symTable = symTable\n\n\t// In Go 1.26+, moduledata is in the .go.module section.\n\t// In earlier versions, we need to search for it in .noptrdata.\n\tvar md []byte\n\tif goModuleSec := elfFile.Section(\".go.module\"); goModuleSec != nil {\n\t\t// Go 1.26+: .go.module section contains moduledata directly\n\t\tmd, err = goModuleSec.Data()\n\t\tif err != nil {","sourceCodeStart":2344,"sourceCodeEnd":2380,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/proc/bininfo.go#L2344-L2380","documentation":"loadBinaryInfoGoRuntime recovers all panics from the best-effort Go runtime symbol parsing and converts them into this error. It indicates readPcLnTableElf (or related pclntab parsing) panicked - malformed or unexpected runtime metadata - rather than returning a normal error.","triggerScenarios":"A panic inside the Go-runtime symbol table reader (bad pclntab offsets, unexpected memory layout, nil deref on a non-Go or corrupted binary) during binary info loading.","commonSituations":"Pointing Delve at a corrupted binary, a binary built by an unsupported Go version, or a binary whose pclntab was obfuscated/removed (e.g. garble).","solutions":["Rebuild the binary with a supported, unmodified Go toolchain.","Avoid obfuscators/strip tools that rewrite pclntab; rebuild plainly.","Report the panic value (%v payload) to Delve as a bug - logflags.Bug is incremented by design.","Fall back to providing DWARF debug info so the runtime-symbol path is not needed."],"exampleFix":"// before\n// app built with: garble -tiny build -o app  (pclntab mangled)\n// after\n// rebuild normally so pclntab is intact:\ngo build -o app ./cmd/app","handlingStrategy":"try-catch","validationCode":"// best-effort check: binary should carry Go pclntab\nf, err := elf.Open(path)\nif err != nil { return err }\nif f.Section(\".gopclntab\") == nil {\n    fmt.Println(\"warning: Go runtime symbol table may be missing\")\n}","typeGuard":null,"tryCatchPattern":"tgt, err := dbg.Launch(path)\nif err != nil && strings.Contains(err.Error(), \"error loading binary info from Go runtime\") {\n    log.Printf(\"pclntab parse panicked: %v - rebuild binary\", err)\n}","preventionTips":["Rebuild with an unmodified, supported Go toolchain.","Avoid obfuscation tools (garble, etc.) that mangle pclntab.","Keep DWARF present so the runtime-symbol fallback is not required.","Report persistent panics to Delve maintainers with the panic payload."],"tags":["go","pclntab","panic-recovery","binary-info","runtime-symbols"],"backgroundTag":"binary-info-panic-recovered","analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}