Navigation Menu

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

cmd/compile: PGO crashes with '-d pgoinline=2' #58437

Closed
shawndx opened this issue Feb 9, 2023 · 2 comments
Closed

cmd/compile: PGO crashes with '-d pgoinline=2' #58437

shawndx opened this issue Feb 9, 2023 · 2 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@shawndx
Copy link
Contributor

shawndx commented Feb 9, 2023

What version of Go are you using (go version)?

$ go version
go version devel go1.21-8fb9565832 Thu Feb 9 01:06:51 2023 +0000 linux/amd64

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE="auto"
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOVCS=""
GOVERSION="devel go1.21-8fb9565832 Thu Feb 9 01:06:51 2023 +0000"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"

What did you do?

% cd <goroot>/src/time
% go test -run=^$ -bench=. -cpuprofile cpu.out
% go test -run=^$ -bench=. -pgo cpu.out -gcflags=all='-d pgoinline=2'

What did you expect to see?

What did you see instead?

hot-budget check allows inlining for call runtime.cleantimers at ../runtime/time.go:279:13
hot-budget check allows inlining for call runtime.doaddtimer at ../runtime/time.go:280:12
hot-budget check allows inlining for call runtime.wakeNetPoller at ../runtime/time.go:283:15
../runtime/alg.go:44:5: internal compiler error: panic: runtime error: index out of range [2] with length 2
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Feb 9, 2023
@gopherbot
Copy link

Change https://go.dev/cl/466915 mentions this issue: cmd/compile/internal/pgo: fix RedirectEdges

@prattmic
Copy link
Member

cc @prattmic @cherrymui

@dr2chase dr2chase added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Feb 10, 2023
@prattmic prattmic added this to the Go1.21 milestone Feb 15, 2023
@golang golang locked and limited conversation to collaborators Feb 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants