Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updat golang.org/x/tools #9

Closed
fxedel opened this issue Apr 16, 2024 · 1 comment · Fixed by #10
Closed

Updat golang.org/x/tools #9

fxedel opened this issue Apr 16, 2024 · 1 comment · Fixed by #10
Assignees

Comments

@fxedel
Copy link

fxedel commented Apr 16, 2024

See golang/go#64812

With Go 1.22.2, running the whitespace linter leads to the following panic:

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=0x190e04]

goroutine 44 [running]:
go/types.(*Checker).handleBailout(0x4000155000, 0x4000767b98)
        /usr/local/go/src/go/types/check.go:367 +0x9c
panic({0x2f4000?, 0x573a40?})
        /usr/local/go/src/runtime/panic.go:770 +0x124
go/types.(*StdSizes).Sizeof(0x0, {0x3c2dc8, 0x577740})
        /usr/local/go/src/go/types/sizes.go:228 +0x314
go/types.(*Config).sizeof(...)
        /usr/local/go/src/go/types/sizes.go:333
go/types.representableConst.func1({0x3c2dc8?, 0x577740?})
        /usr/local/go/src/go/types/const.go:76 +0x9c
go/types.representableConst({0x3c4138, 0x56c3c0}, 0x4000155000, 0x577740, 0x4000762608)
        /usr/local/go/src/go/types/const.go:92 +0x138
go/types.(*Checker).representation(0x4000155000, 0x4000880000, 0x577740)
        /usr/local/go/src/go/types/const.go:256 +0x68
go/types.(*Checker).implicitTypeAndValue(0x4000155000, 0x4000880000, {0x3c2dc8, 0x577740})
        /usr/local/go/src/go/types/expr.go:375 +0x304
go/types.(*Checker).assignment(0x4000155000, 0x4000880000, {0x3c2dc8, 0x577740}, {0x4000194498, 0x13})
        /usr/local/go/src/go/types/assignments.go:52 +0x23c
go/types.(*Checker).arguments(0x4000155000, 0x4000196d40, 0x400028d200, {0x0, 0x0, 0x0}, {0x0, 0x0, 0x0}, {0x4000723c18, ...}, ...)
        /usr/local/go/src/go/types/call.go:654 +0xef4
go/types.(*Checker).callExpr(0x4000155000, 0x400028df00, 0x4000196d40)
        /usr/local/go/src/go/types/call.go:304 +0x5ac
go/types.(*Checker).exprInternal(0x4000155000, 0x0, 0x400028df00, {0x3c3c68, 0x4000196d40}, {0x0, 0x0})
        /usr/local/go/src/go/types/expr.go:1374 +0xd0
go/types.(*Checker).rawExpr(0x4000155000, 0x0, 0x400028df00, {0x3c3c68?, 0x4000196d40?}, {0x0?, 0x0?}, 0x0)
        /usr/local/go/src/go/types/expr.go:979 +0x12c
go/types.(*Checker).expr(0x4000155000, 0x400028df00?, 0x400028df00, {0x3c3c68?, 0x4000196d40?})
        /usr/local/go/src/go/types/expr.go:1513 +0x38
go/types.(*Checker).exprInternal(0x4000155000, 0x0, 0x400028df00, {0x3c3518, 0x4000196d80}, {0x0, 0x0})
        /usr/local/go/src/go/types/expr.go:1190 +0x1800
go/types.(*Checker).rawExpr(0x4000155000, 0x0, 0x400028df00, {0x3c3518?, 0x4000196d80?}, {0x0?, 0x0?}, 0x0)
        /usr/local/go/src/go/types/expr.go:979 +0x12c
go/types.(*Checker).expr(0x4000155000, 0xa81817?, 0x400028df00, {0x3c3518?, 0x4000196d80?})
        /usr/local/go/src/go/types/expr.go:1513 +0x38
go/types.(*Checker).unary(0x4000155000, 0x400028df00, 0x4000475b80)
        /usr/local/go/src/go/types/expr.go:127 +0x44
go/types.(*Checker).exprInternal(0x4000155000, 0x0, 0x400028df00, {0x3c36c8, 0x4000475b80}, {0x0, 0x0})
        /usr/local/go/src/go/types/expr.go:1406 +0x1328
go/types.(*Checker).rawExpr(0x4000155000, 0x0, 0x400028df00, {0x3c36c8?, 0x4000475b80?}, {0x0?, 0x0?}, 0x0)
        /usr/local/go/src/go/types/expr.go:979 +0x12c
go/types.(*Checker).expr(0x4000155000, 0x400012a1c0?, 0x400028df00, {0x3c36c8?, 0x4000475b80?})
        /usr/local/go/src/go/types/expr.go:1513 +0x38
go/types.(*Checker).initVars(0x4000155000, {0x4000723968, 0x1, 0x4000024dc0?}, {0x4000182d60, 0x4000161d40?, 0x40000b0000?}, {0x3c3938, 0x4000475ba0?})
        /usr/local/go/src/go/types/assignments.go:381 +0x570
go/types.(*Checker).stmt(0x4000155000, 0x0, {0x3c3938, 0x4000475ba0})
        /usr/local/go/src/go/types/stmt.go:524 +0x1898
go/types.(*Checker).stmtList(0x4000155000, 0x0, {0x4000182de0?, 0x347029?, 0x5?})
        /usr/local/go/src/go/types/stmt.go:121 +0x88
go/types.(*Checker).stmt(0x4000155000, 0x0, {0x3c39c8, 0x40001b49c0})
        /usr/local/go/src/go/types/stmt.go:562 +0x1974
go/types.(*Checker).stmt(0x4000155000, 0x0, {0x3c39f8, 0x4000196dc0})
        /usr/local/go/src/go/types/stmt.go:574 +0x258c
go/types.(*Checker).stmtList(0x4000155000, 0x0, {0x4000196e00?, 0x0?, 0x0?})
        /usr/local/go/src/go/types/stmt.go:121 +0x88
go/types.(*Checker).funcBody(0x4000155000, 0x3c2e18?, {0x40004b2590?, 0x400012a1c0?}, 0x400028c440, 0x40001b49f0, {0x0?, 0x0?})
        /usr/local/go/src/go/types/stmt.go:41 +0x21c
go/types.(*Checker).funcDecl.func1()
        /usr/local/go/src/go/types/decl.go:852 +0x44
go/types.(*Checker).processDelayed(0x4000155000, 0x0)
        /usr/local/go/src/go/types/check.go:467 +0x12c
go/types.(*Checker).checkFiles(0x4000155000, {0x40002b3010, 0x2, 0x2})
        /usr/local/go/src/go/types/check.go:411 +0x188
go/types.(*Checker).Files(...)
        /usr/local/go/src/go/types/check.go:372
golang.org/x/tools/go/packages.(*loader).loadPackage(0x400015a000, 0x4000492810)
        /go/pkg/mod/golang.org/x/tools@v0.12.0/go/packages/packages.go:1058 +0x8cc
golang.org/x/tools/go/packages.(*loader).loadRecursive.func1()
        /go/pkg/mod/golang.org/x/tools@v0.12.0/go/packages/packages.go:854 +0x178
sync.(*Once).doSlow(0x0?, 0x0?)
        /usr/local/go/src/sync/once.go:74 +0x100
sync.(*Once).Do(...)
        /usr/local/go/src/sync/once.go:65
golang.org/x/tools/go/packages.(*loader).loadRecursive(0x0?, 0x0?)
        /go/pkg/mod/golang.org/x/tools@v0.12.0/go/packages/packages.go:842 +0x50
golang.org/x/tools/go/packages.(*loader).loadRecursive.func1.1(0x0?)
        /go/pkg/mod/golang.org/x/tools@v0.12.0/go/packages/packages.go:849 +0x30
created by golang.org/x/tools/go/packages.(*loader).loadRecursive.func1 in goroutine 43
        /go/pkg/mod/golang.org/x/tools@v0.12.0/go/packages/packages.go:848 +0x84
@robinknaapen robinknaapen self-assigned this Apr 18, 2024
@robinknaapen robinknaapen linked a pull request Apr 18, 2024 that will close this issue
@fxedel
Copy link
Author

fxedel commented Apr 26, 2024

Thanks, works again 👍

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 a pull request may close this issue.

2 participants