delve/pkg/dwarf/godwarf
aarzilli 7e86d6749f dwarf/godwarf: tolerate cyclical type DIEs
As specified in line dwarf/godwarf/type.go:507 the typeCache entry
should always be set before recursive calls to readType to avoid infite
recursion.
Most code in readType already does this but some of the code added
later to handle Go types was wrong.
Fix this bug and also fix the String and Size methods of Type so that
they handle recursive types "correctly" (i.e. they don't recur
forever).

No test is added for this since all legitimate uses of cyclical types
were already handled correctly and the malformed types emitted by the
go compiler will probably be removed in 1.12.
See: https://github.com/golang/go/issues/29264

Fixes #1444
2019-01-04 14:52:28 -08:00
..
sections.go proc: support GNU compressed debug sections (go1.11 support) 2018-06-22 11:20:38 -07:00
type.go dwarf/godwarf: tolerate cyclical type DIEs 2019-01-04 14:52:28 -08:00