golang/go · error
subprogram DIE high not convertible to uint64
Error message
subprogram DIE high not convertible to uint64
What it means
In the Go linker's internal DWARF validation module (dwtest), this error fires when a subprogram DIE's high_pc attribute is classified as ClassAddress (a direct address) but its underlying value fails the uint64 type assertion. Per the DWARF standard, a ClassAddress high_pc must hold an address-sized unsigned integer. A non-uint64 value means the DWARF producer emitted malformed or unexpected debug information.
Source
Thrown at src/cmd/link/internal/dwtest/dwtest.go:237
lo = lopc
} else {
err = fmt.Errorf("subprogram DIE low_pc not convertible to uint64")
return
}
// For the high_pc value, we'll accept either an address or a constant
// offset from lo pc.
hifield := subprogdie.AttrField(dwarf.AttrHighpc)
if hifield == nil {
err = fmt.Errorf("subprogram DIE has no high_pc attr")
return
}
switch hifield.Class {
case dwarf.ClassAddress:
if hipc, ok := hifield.Val.(uint64); ok {
hi = hipc
} else {
err = fmt.Errorf("subprogram DIE high not convertible to uint64")
return
}
case dwarf.ClassConstant:
if hioff, ok := hifield.Val.(int64); ok {
hi = lo + uint64(hioff)
} else {
err = fmt.Errorf("subprogram DIE high_pc not convertible to uint64")
return
}
default:
err = fmt.Errorf("subprogram DIE high_pc unknown value class %s",
hifield.Class)
}
return
}
View on GitHub (pinned to b6b368adc5)
Solutions
- Report the issue at https://github.com/golang/go/issues with the full linker flags, GOOS/GOARCH, and a reproducer
- Clean the build cache and rebuild from scratch: go clean -cache && go build
- Ensure all packages and their dependencies are compiled with the same Go version
- If cross-compiling, verify the target platform is fully supported by the toolchain version
Defensive patterns
Strategy: try-catch
Type guard
// Type guard for DWARF high_pc ClassAddress value
func isHighPCAddressValue(v interface{}) bool {
_, ok := v.(uint64)
return ok
} Try / catch
// Wrap DWARF validation with graceful error handling
hi, err := validateHighPC(subprogdie, lo)
if err != nil {
log.Printf("DWARF validation warning: %v — skipping DIE", err)
continue // skip this DIE rather than abort
} Prevention
- Use the same Go version for all compilation units in a build
- Run go clean -cache when switching Go versions
- Report DWARF validation failures to the Go project — they indicate toolchain bugs
When it happens
Trigger: The dwtest validator calls subprogdie.AttrField(dwarf.AttrHighpc), inspects hifield.Class, and when Class == dwarf.ClassAddress performs hifield.Val.(uint64). If the type assertion fails (the value is e.g. int64, int, or another type), this error is returned immediately.
Common situations: A bug in the Go compiler or linker DWARF emission pipeline; linking object files compiled by mismatched Go versions that emit different DWARF attribute types; using an experimental or development Go toolchain with incomplete DWARF changes.
Related errors
- subprogram DIE high_pc not convertible to uint64
- subprogram DIE high_pc unknown value class %s
- no DWARF data in go object file
- no DWARF data in Plan 9 file
- missing __LINKEDIT segment
AI-assisted analysis of golang/go@b6b368adc5 (2026-08-12).
Data as JSON: /api/errors/d40215fd0863f315.
Report an issue: GitHub.