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

x/tools/go/analysis/passes/composite: false positive with gollvm #41918

Open
advancedwebdeveloper opened this issue Oct 11, 2020 · 3 comments
Open
Labels
Analysis Issues related to static analysis (vet, x/tools/go/analysis) NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@advancedwebdeveloper
Copy link

Hi.

I was trying to build Delve - and caught this error.

$ go version

go version go1.15.2 gollvm LLVM 12.0.0git linux/amd64
gollvm
My release build

go env$ go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/oceanfish81/.cache/go-build" GOENV="/home/oceanfish81/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/home/oceanfish81/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/oceanfish81/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/home/oceanfish81/gollvm_dist" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/home/oceanfish81/gollvm_dist/tools" GCCGO="/home/oceanfish81/gollvm_dist/bin/llvm-goc" AR="ar" CC="/usr/bin/clang" CXX="/usr/bin/clang++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build841452971=/tmp/go-build -gno-record-gcc-switches -funwind-tables"
$ go env

Right after cloning from the master branch:

$ make

github.com/go-delve/delve/pkg/proc
pkg/proc/eval.go:653:9: conversion from int64 to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?)

github.com/go-delve/delve/pkg/proc_test
pkg/proc/proc_test.go:32:24: github.x2ecom/go-delve/delve/pkg/proc.LoadConfig composite literal uses unkeyed fields
pkg/proc/proc_test.go:2656:33: github.x2ecom/go-delve/delve/pkg/proc.LoadConfig composite literal uses unkeyed fields
make: *** [Makefile:19: vet] Error 2

CC @alandonovan @matloob
CC @polinasok @aarzilli @derekparker @epipho @chainhelen

@stamblerre stamblerre changed the title "composite literal uses unkeyed fields" in go-delve/delve and x/tools/go/analysis/passes/composite [gollvm] x/tools/go/analysis/passes/composite: false positive with gollvm Oct 12, 2020
@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Oct 12, 2020
@gopherbot gopherbot added this to the Unreleased milestone Oct 12, 2020
@stamblerre
Copy link
Contributor

Thanks for the report. Linking the relevant comment from the original issue: go-delve/delve#2191 (comment).

@dmitshur dmitshur added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Oct 13, 2020
@advancedwebdeveloper
Copy link
Author

Thanks for the report. Linking the relevant comment from the original issue: go-delve/delve#2191 (comment).

It was closed without any farther investigation.

@aarzilli
Copy link
Contributor

@advancedwebdeveloper I thought @ianlancetaylor comment was exhaustive, what further investigation do you think should have been done?

@timothy-king timothy-king added the Analysis Issues related to static analysis (vet, x/tools/go/analysis) label Jan 26, 2021
@seankhliao seankhliao modified the milestones: Unreleased, gollvm Aug 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Analysis Issues related to static analysis (vet, x/tools/go/analysis) NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

7 participants