-
Backports debug/dwarf commit: 535741a69a1300d1fe2800778b99c8a1b75d7fdd CL: https://go-review.googlesource.com/18459 The x/debug/dwarf that we used for dwarf/godwarf/type.go was forked from debug/dwarf long before this commit. Original description: Currently readType simultaneously constructs a type graph and resolves the sizes of the types. However, these two operations are fundamentally at odds: the order we parse a cyclic structure in may be different than the order we need to resolve type sizes in. As a result, it's possible that when readType attempts to resolve the size of a typedef, it may dereference a nil Type field of another typedef retrieved from the type cache that's only partially constructed. To fix this, we delay resolving typedef sizes until the end of the readType recursion, when the full type graph is constructed. Fixes #1601
a8b8f30d