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: internal compiler error: panic: runtime error: slice bounds out of range [712097:26324] #54282

Open
Pxingtian opened this issue Aug 5, 2022 · 6 comments
Labels
compiler/runtime WaitingForInfo
Milestone

Comments

@Pxingtian
Copy link

Pxingtian commented Aug 5, 2022

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

$ go version
go version go1.18.1 windows/amd64

Does this issue reproduce with the latest release?

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

go env Output
$ go env

set GO111MODULE=on
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\LENOVO‘\AppData\Local\go-build
set GOENV=C:\Users\LENOVO‘\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=E:\lenovo\Desktop\SupervisorySystem\supermet\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=E:\lenovo\Desktop\SupervisorySystem\supermet
set GOPRIVATE=
set GOPROXY=https://goproxy.cn,direct
set GOROOT=F:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=F:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.18.1
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=E:\lenovo\Desktop\SupervisorySystem\supermet\src\supermet\go.mod
set GOWORK=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\LENOVO‘\AppData\Local\Temp\go-build3606341032=/tmp/go-build -gno-record-gcc-switches

What did you do?

Vscode restart

What did you expect to see?

I expect vscode golang debug to work properly

What did you see instead?

Starting: E:\lenovo\Desktop\SupervisorySystem\supermet\bin\dlv.exe dap --check-go-version=false --log=true --log-output=debugger --listen=127.0.0.1:56773 from e:\lenovo\Desktop\SupervisorySystem\supermet\src\supermet
DAP server listening at: 127.0.0.1:56773
Build Error: go build -o e:\lenovo\Desktop\SupervisorySystem\supermet\src\supermet\__debug_bin.exe -gcflags all=-N -l .
# supermet/models/vehicles
: internal compiler error: panic: runtime error: slice bounds out of range [712097:26324]

Please file a bug report including a short program that triggers the error.
https://go.dev/issue/new (exit status 2)
@mvdan mvdan changed the title Build Error: go build -o e:\lenovo\Desktop\SupervisorySystem\supermet\src\supermet\__debug_bin.exe -gcflags all=-N -l . # supermet/models/vehicles <unknown line number>: internal compiler error: panic: runtime error: slice bounds out of range [712097:26324] cmd/compile: internal compiler error: panic: runtime error: slice bounds out of range [712097:26324] Aug 5, 2022
@gopherbot gopherbot added the compiler/runtime label Aug 5, 2022
@mvdan
Copy link
Member

mvdan commented Aug 5, 2022

Please see if the problem reproduces with the latest stable version of Go: either 1.18.5 or 1.19.

@mvdan mvdan added the WaitingForInfo label Aug 5, 2022
@mknyszek mknyszek added this to the Backlog milestone Aug 10, 2022
@mknyszek
Copy link
Contributor

mknyszek commented Aug 10, 2022

CC @golang/compiler

@mdempsky
Copy link
Member

mdempsky commented Aug 10, 2022

We'll need the relevant source files to reproduce the issue.

@Pxingtian
Copy link
Author

Pxingtian commented Aug 11, 2022

There is no source file. This debug tool is installed from vscode。

@Pxingtian
Copy link
Author

Pxingtian commented Aug 11, 2022

@mdempsky
Copy link
Member

mdempsky commented Aug 11, 2022

The error you posted is from the Go compiler trying to compile the package "supermet/models/vehicles":

Build Error: go build -o e:\lenovo\Desktop\SupervisorySystem\supermet\src\supermet\__debug_bin.exe -gcflags all=-N -l .
# supermet/models/vehicles
: internal compiler error: panic: runtime error: slice bounds out of range [712097:26324]

That's your source package, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime WaitingForInfo
Projects
Status: No status
Development

No branches or pull requests

5 participants