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/link: panic: runtime error: slice bounds out of range [:4294967294] with capacity 287000 #63787

Closed
pellared opened this issue Oct 27, 2023 · 1 comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime.

Comments

@pellared
Copy link

pellared commented Oct 27, 2023

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

$ go version
go version go1.21.3 linux/arm

Does this issue reproduce with the latest release?

Yes.

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

$ uname -a
Linux pi 6.1.21-v7+ #1642 SMP Mon Apr  3 17:20:52 BST 2023 armv7l GNU/Linux
go env Output
$ go env
GO111MODULE=''
GOARCH='arm'
GOBIN=''
GOCACHE='/home/pellared/.cache/go-build'
GOENV='/home/pellared/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/pellared/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/pellared/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/linux_arm'
GOVCS=''
GOVERSION='go1.21.3'
GCCGO='gccgo'
GOARM='6'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/dev/null'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -marm -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build3010185493=/tmp/go-build -gno-record-gcc-switches'

What did you do?

go install github.com/pellared/cloudflare-ddns@3264d74a88c9bd2b346d17da673003f9dfc6ed8b

What did you expect to see?

Nothing (exit code 0).

What did you see instead?

$ go install github.com/pellared/cloudflare-ddns@3264d74a88c9bd2b346d17da673003f9dfc6ed8b
# github.com/pellared/cloudflare-ddns
panic: runtime error: slice bounds out of range [:4294967294] with capacity 287000

goroutine 1 [running]:
cmd/internal/goobj.(*Reader).StringAt(...)
        cmd/internal/goobj/objfile.go:654
cmd/internal/goobj.(*Reader).StringRef(0x2070b80, 0x60cb)
        cmd/internal/goobj/objfile.go:676 +0x144
cmd/internal/goobj.(*Reader).Autolib(0x2070b80)
        cmd/internal/goobj/objfile.go:688 +0x88
cmd/link/internal/loader.(*Loader).Preload(0x214a000, 0x1c, 0x2020378, 0x252c850, 0x2065650, 0x46118)
        cmd/link/internal/loader/loader.go:2147 +0x360
cmd/link/internal/ld.ldobj(0x2120000, 0x2020378, 0x252c850, 0x46189, {0x2018c40, 0x6c}, {0x212a97e, 0x64})
        cmd/link/internal/ld/lib.go:2294 +0xb58
cmd/link/internal/ld.loadobjfile(0x2120000, 0x252c850)
        cmd/link/internal/ld/lib.go:1136 +0x814
cmd/link/internal/ld.(*Link).loadlib(0x2120000)
        cmd/link/internal/ld/lib.go:544 +0x21c
cmd/link/internal/ld.Main(0x4a4bb8, {0x4, 0x8, 0x1, 0xd, 0xe, 0x1c00000, {0x0, 0x0, 0x0}, ...})
        cmd/link/internal/ld/main.go:284 +0x1494
main.main()
        cmd/link/main.go:72 +0xbd8
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Oct 27, 2023
@pellared
Copy link
Author

pellared commented Oct 27, 2023

I made it working by:

  1. Reinstalling Go
  2. Clearing caches via go clear -cache -modcache.

I think that the second step helped.

@pellared pellared closed this as not planned Won't fix, can't repro, duplicate, stale Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime.
Projects
None yet
Development

No branches or pull requests

2 participants