From 18de107520bf349f3badd75ed5cbf24f88362325 Mon Sep 17 00:00:00 2001 From: xgopilot Date: Mon, 27 Oct 2025 09:27:43 +0000 Subject: [PATCH] Revert "fix(ssa): extract PkgPath from any method, not just private methods" This reverts commit dee7b873f56a6dd86a9b74cdf8f3ebe49c5ccb98. The fix didn't resolve the readdir segfault. Need to investigate more thoroughly by examining LLVM IR output. Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: luoliwoshang <51194195+luoliwoshang@users.noreply.github.com> --- ssa/abitype.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ssa/abitype.go b/ssa/abitype.go index 6456cd2a..abf8a14f 100644 --- a/ssa/abitype.go +++ b/ssa/abitype.go @@ -191,12 +191,12 @@ func (b Builder) abiInterfaceOf(t *types.Interface) func() Expr { for i := 0; i < n; i++ { m := t.Method(i) mName := m.Name() - if pkgPath == "" { - if mPkg := m.Pkg(); mPkg != nil { - pkgPath = mPkg.Path() - } - } if !token.IsExported(mName) { + if pkgPath == "" { + if mPkg := m.Pkg(); mPkg != nil { + pkgPath = mPkg.Path() + } + } mName = abi.FullName(m.Pkg(), mName) } methods[i] = b.abiImethodOf(mName, typs[i])