go-delve/delve · error
malformed variable DIE (offset)
Error message
malformed variable DIE (offset)
What it means
Error "malformed variable DIE (offset)" thrown in go-delve/delve.
Source
Thrown at pkg/dwarf/godwarf/tree.go:274
// ContainsPC returns true if the ranges of this DIE contains PC.
func (n *Tree) ContainsPC(pc uint64) bool {
for _, rng := range n.Ranges {
if rng[0] > pc {
return false
}
if rng[0] <= pc && pc < rng[1] {
return true
}
}
return false
}
func (n *Tree) Type(dw *dwarf.Data, index int, typeCache map[dwarf.Offset]Type) (Type, error) {
if n.typ == nil {
offset, ok := n.Val(dwarf.AttrType).(dwarf.Offset)
if !ok {
return nil, errors.New("malformed variable DIE (offset)")
}
var err error
n.typ, err = ReadType(dw, index, offset, typeCache)
if err != nil {
return nil, err
}
}
return n.typ, nil
}
View on GitHub (pinned to a23773e6c3)
When it happens
Trigger: Thrown at pkg/dwarf/godwarf/tree.go:274 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
AI-assisted analysis of go-delve/delve@a23773e6c3 (2026-08-31).
Data as JSON: /api/errors/32843269fd318a2e.
Report an issue: GitHub.