Files
llgo/ssa
xgopilot dee7b873a6 fix(ssa): extract PkgPath from any method, not just private methods
The previous fix only extracted package path from private methods,
causing segfaults for interfaces with only exported methods (like fs.DirEntry).

Root cause:
- For interfaces with only exported methods, the loop never entered
  the !token.IsExported(mName) block
- pkgPath remained empty and fell back to pkg.Path() (compilation package)
- This caused wrong PkgPath for standard library interfaces like fs.DirEntry
- Runtime received wrong package path, leading to segfaults

Fix:
- Extract pkgPath from the FIRST method (any method), not just private ones
- All methods have correct package information via m.Pkg()
- Only fall back to pkg.Path() if the interface has no methods or m.Pkg() is nil

This fixes the readdir demo segfault while maintaining the fix for issue #1370.

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: luoliwoshang <51194195+luoliwoshang@users.noreply.github.com>
2025-10-27 09:07:35 +00:00
..
2025-04-03 16:26:11 +08:00
2025-04-03 16:26:11 +08:00
2025-04-08 10:46:14 +08:00
2025-04-08 10:46:14 +08:00
2025-09-09 16:51:08 +08:00
2025-10-15 13:51:16 +08:00
2025-10-15 12:21:51 +08:00
2025-05-18 17:03:47 +08:00
2025-09-18 21:16:06 +08:00
2025-04-03 16:26:11 +08:00
2025-08-08 12:11:17 +08:00
2025-04-11 16:28:48 +08:00
2025-08-07 20:39:35 +08:00
2025-04-03 16:26:11 +08:00
2025-04-08 10:46:14 +08:00