Skip to content

Conversation

@daved
Copy link

@daved daved commented Dec 30, 2024

After running into:

panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x62e5af]

Which showed:

golang.org/x/tools/go/packages.(*loader).loadRecursive(0x0?, 0x0?)
        /home/daved/code/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:787 +0x3b
golang.org/x/tools/go/packages.(*loader).loadRecursive.func1.1(0x0?)
        /home/daved/code/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:794 +0x26
created by golang.org/x/tools/go/packages.(*loader).loadRecursive.func1 in goroutine 145
        /home/daved/code/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:793 +0x94

I only spent enough time debugging to confirm that the calling code was encountering this issue due to the golang.org/x/tools dep. After updating, the issue is gone. This does bump the Go version to 1.22.0. In February, 1.22.0 will no longer be supported, but it's an improvement over the previous 1.16 value. The build has only been confirmed using Linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant