Skip to content

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

@shawndx

Description

@shawndx

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.compiler/runtimeIssues related to the Go compiler and/or runtime.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions