Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

panic: no concrete method, gokart 0.5.1, go 1.21 #92

Open
vlaship opened this issue Aug 13, 2023 · 4 comments
Open

panic: no concrete method, gokart 0.5.1, go 1.21 #92

vlaship opened this issue Aug 13, 2023 · 4 comments

Comments

@vlaship
Copy link

vlaship commented Aug 13, 2023

Using config found at ...\.gokart\analyzers.yml

Revving engines VRMMM VRMMM
3...2...1...Go!
panic: no concrete method: func (*math/rand.Rand).ExpFloat64() float64

goroutine 1 [running]:
golang.org/x/tools/go/ssa.(*Program).declaredFunc(0xc000000d80, 0xc001911ce0)
...
$ gokart version
v0.5.1

$ go version
go version go1.21.0 windows/amd64
@suarez-agu
Copy link

I get the following

Initializing default config at /Users/user/.gokart/analyzers.yml
Using config found at /Users/user/.gokart/analyzers.yml

Revving engines VRMMM VRMMM
3...2...1...Go!
panic: no concrete method: func (*crypto/x509/pkix.CertificateList).HasExpired(now time.Time) bool
$ go version
go version go1.21.0 darwin/arm64

$ gokart version
v0.5.1

@ktqj
Copy link

ktqj commented Jan 16, 2024

I also get similar error

> gokart scan ./...
Using config found at /Users/evgeny.ivanov/.gokart/analyzers.yml

Revving engines VRMMM VRMMM
3...2...1...Go!
panic: no concrete method: func (*crypto/x509.Certificate).CheckCRLSignature(crl *crypto/x509/pkix.CertificateList) error

goroutine 1 [running]:
golang.org/x/tools/go/ssa.(*Program).declaredFunc(0x140000c6480, 0x14000427860)
	/Users/evgeny.ivanov/go/pkg/mod/golang.org/x/[email protected]/go/ssa/methods.go:149 +0x104
golang.org/x/tools/go/ssa.(*Program).originFunc(0x14000676050?, 0x104e83910?)
	/Users/evgeny.ivanov/go/pkg/mod/golang.org/x/[email protected]/go/ssa/source.go:193 +0x30
golang.org/x/tools/go/ssa.(*Program).addMethod(0x140000c6480, 0x140004b4540, 0x14000676050, 0x10503b380?)
	/Users/evgeny.ivanov/go/pkg/mod/golang.org/x/[email protected]/go/ssa/methods.go:109 +0x148
golang.org/x/tools/go/ssa.(*Program).needMethods(0x140000c6480, {0x105139fb0?, 0x140003ac700?}, 0x0, 0x105519160?)
	/Users/evgeny.ivanov/go/pkg/mod/golang.org/x/[email protected]/go/ssa/methods.go:200 +0x610
golang.org/x/tools/go/ssa.(*Program).needMethods(0x140000c6480, {0x10513a050?, 0x140003ac710?}, 0x0, 0x105519168?)
	/Users/evgeny.ivanov/go/pkg/mod/golang.org/x/[email protected]/go/ssa/methods.go:223 +0x26c
golang.org/x/tools/go/ssa.(*Program).needMethods(0x140000c6480, {0x10513a0a0?, 0x140001997d0?}, 0x1, 0x105519160?)
	/Users/evgeny.ivanov/go/pkg/mod/golang.org/x/[email protected]/go/ssa/methods.go:255 +0x544
golang.org/x/tools/go/ssa.(*Program).needMethods(0x140000c6480, {0x105139fd8?, 0x14000180d20?}, 0x0, 0x105519160?)
	/Users/evgeny.ivanov/go/pkg/mod/golang.org/x/[email protected]/go/ssa/methods.go:248 +0x3cc
golang.org/x/tools/go/ssa.(*Program).needMethods(0x140000c6480, {0x10513a078?, 0x1400072d890?}, 0x0, 0x105519160?)
	/Users/evgeny.ivanov/go/pkg/mod/golang.org/x/[email protected]/go/ssa/methods.go:260 +0x4e0
golang.org/x/tools/go/ssa.(*Program).needMethods(0x140000c6480, {0x105139f88?, 0x140003aa500?}, 0x0, 0x105519168?)
	/Users/evgeny.ivanov/go/pkg/mod/golang.org/x/[email protected]/go/ssa/methods.go:236 +0x324
golang.org/x/tools/go/ssa.(*Program).needMethods(0x140000c6480, {0x10513a0a0?, 0x14000199890?}, 0x1, 0x105519160?)
	/Users/evgeny.ivanov/go/pkg/mod/golang.org/x/[email protected]/go/ssa/methods.go:255 +0x544
golang.org/x/tools/go/ssa.(*Program).needMethods(0x140000c6480, {0x105139fd8?, 0x140001801c0?}, 0x0, 0x105519160?)
	/Users/evgeny.ivanov/go/pkg/mod/golang.org/x/[email protected]/go/ssa/methods.go:248 +0x3cc
golang.org/x/tools/go/ssa.(*Program).needMethods(0x140000c6480, {0x105139fb0?, 0x140003ac890?}, 0x0, 0x105519160?)
	/Users/evgeny.ivanov/go/pkg/mod/golang.org/x/[email protected]/go/ssa/methods.go:220 +0x23c
golang.org/x/tools/go/ssa.(*Program).needMethods(0x140000c6480, {0x10513a078?, 0x1400072d908?}, 0x0, 0x105519160?)
	/Users/evgeny.ivanov/go/pkg/mod/golang.org/x/[email protected]/go/ssa/methods.go:260 +0x4e0
golang.org/x/tools/go/ssa.(*Program).needMethods(0x140000c6480, {0x105139fd8?, 0x140001800e0?}, 0x0, 0x0?)
	/Users/evgeny.ivanov/go/pkg/mod/golang.org/x/[email protected]/go/ssa/methods.go:208 +0x18c
golang.org/x/tools/go/ssa.(*Program).needMethodsOf(0x0?, {0x105139fd8?, 0x140001800e0?}, 0x10513ff20?)
	/Users/evgeny.ivanov/go/pkg/mod/golang.org/x/[email protected]/go/ssa/methods.go:172 +0xb4
golang.org/x/tools/go/ssa.(*builder).needsRuntimeTypes(0x140000f3438)
	/Users/evgeny.ivanov/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:2375 +0x31c
golang.org/x/tools/go/ssa.(*Package).build(0x140003fe900)
	/Users/evgeny.ivanov/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:2530 +0xa28
sync.(*Once).doSlow(0x140000c6480?, 0x140002c4060?)
	/opt/homebrew/Cellar/go/1.21.5/libexec/src/sync/once.go:74 +0x100
sync.(*Once).Do(...)
	/opt/homebrew/Cellar/go/1.21.5/libexec/src/sync/once.go:65
golang.org/x/tools/go/ssa.(*Package).Build(...)
	/Users/evgeny.ivanov/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:2413
golang.org/x/tools/go/analysis/passes/buildssa.run(0x140001181a0)
	/Users/evgeny.ivanov/go/pkg/mod/golang.org/x/[email protected]/go/analysis/passes/buildssa/buildssa.go:73 +0x13c
github.com/praetorian-inc/gokart/run.RunAnalyzers({0x10554dde0, 0x5, 0x140000f3858?}, 0x1400041ea80)
	/Users/evgeny.ivanov/go/pkg/mod/github.com/praetorian-inc/[email protected]/run/run.go:133 +0x178
github.com/praetorian-inc/gokart/run.Run({0x10554dde0, 0x5, 0x5}, {0x140000418d0?, 0x0?, 0x0?})
	/Users/evgeny.ivanov/go/pkg/mod/github.com/praetorian-inc/[email protected]/run/run.go:42 +0x114
github.com/praetorian-inc/gokart/analyzers.Scan({0x140000418d0?, 0x1, 0x1})
	/Users/evgeny.ivanov/go/pkg/mod/github.com/praetorian-inc/[email protected]/analyzers/scan.go:163 +0x764
github.com/praetorian-inc/gokart/cmd.glob..func1(0x14000188200?, {0x140000418d0, 0x1, 0x1})
	/Users/evgeny.ivanov/go/pkg/mod/github.com/praetorian-inc/[email protected]/cmd/scan.go:91 +0x4a8
github.com/spf13/cobra.(*Command).execute(0x105555360, {0x140000418a0, 0x1, 0x1})
	/Users/evgeny.ivanov/go/pkg/mod/github.com/spf13/[email protected]/command.go:860 +0x550
github.com/spf13/cobra.(*Command).ExecuteC(0x1055550e0)
	/Users/evgeny.ivanov/go/pkg/mod/github.com/spf13/[email protected]/command.go:974 +0x318
github.com/spf13/cobra.(*Command).Execute(...)
	/Users/evgeny.ivanov/go/pkg/mod/github.com/spf13/[email protected]/command.go:902
github.com/praetorian-inc/gokart/cmd.Execute(...)
	/Users/evgeny.ivanov/go/pkg/mod/github.com/praetorian-inc/[email protected]/cmd/root.go:61
main.main()
	/Users/evgeny.ivanov/go/pkg/mod/github.com/praetorian-inc/[email protected]/main.go:38 +0x28
> gokart version
v0.5.1
> go version
go version go1.21.5 darwin/arm64

The go program that reproduces the error

package main

import "net/http"

func main() {
	var h any = http.Header{}
	_ = h
}

This is possibly related to a fixed issue with x/tools/nilness golang/go#58296

@TylerJang27
Copy link

I also get this issue on all recent versions of gokart and go versions 1.21.1, 1.22.0, and 1.17.x with the repro above

@ktqj
Copy link

ktqj commented Mar 8, 2024

The solution is not to use gokart - it's no longer maintained

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

4 participants