From e26381ec3f70038491c75b578107a708e9d75ea2 Mon Sep 17 00:00:00 2001 From: Peter Schuurman Date: Fri, 14 Mar 2025 18:17:39 -0700 Subject: [PATCH] Add nil checks for type values when processing objects --- internal/gocore/type.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/gocore/type.go b/internal/gocore/type.go index 1d052a2..23f9249 100644 --- a/internal/gocore/type.go +++ b/internal/gocore/type.go @@ -193,6 +193,9 @@ func (p *Process) findItab() runtimeItab { // Type is the field representing either abi.ITab.Type or runtime.itab._type. func (r runtimeItab) Type() *Field { + if r.typ == nil { + return nil + } return r.typ.field("Type") } @@ -642,6 +645,9 @@ func (p *Process) typeObject(a core.Address, t *Type, r reader, add func(core.Ad return } if t.Kind == KindIface { + if p.findItab().Type() == nil { + return + } typPtr = p.proc.ReadPtr(typPtr.Add(p.findItab().Type().Off)) } // TODO: for KindEface, type typPtr. It might point to the heap