go version)?$ go version go version go1.15.4 linux/amd64
go env)?go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/sasha/.cache/go-build"
GOENV="/home/sasha/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/sasha/goenv/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/sasha/goenv"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build111267796=/tmp/go-build -gno-record-gcc-switches"
GOROOT/bin/go version: go version go1.15.4 linux/amd64
GOROOT/bin/go tool compile -V: compile version go1.15.4
uname -sr: Linux 4.19.128-microsoft-standard
Distributor ID: Kali
Description: Kali GNU/Linux Rolling
Release: 2020.2
Codename: kali-rolling
/lib/x86_64-linux-gnu/libc.so.6: GNU C Library (Debian GLIBC 2.31-3) stable release version 2.31.
gdb --version: GNU gdb (Debian 9.2-1) 9.2
https://play.golang.org/p/SwAU9tKYRsj
Error via return value
panic: runtime error: slice bounds out of range [9:8]
goroutine 1 [running]:
golang.org/x/text/internal/language.(*scanner).resizeRange(0xc000068d08, 0x6, 0x8, 0x3)
/tmp/gopath300097471/pkg/mod/golang.org/x/[email protected]/internal/language/parse.go:142 +0x2e7
golang.org/x/text/internal/language.(*scanner).replace(...)
/tmp/gopath300097471/pkg/mod/golang.org/x/[email protected]/internal/language/parse.go:151
golang.org/x/text/internal/language.parseTag(0xc000068d08, 0x0, 0x0, 0x0, 0xc00007e0a3)
/tmp/gopath300097471/pkg/mod/golang.org/x/[email protected]/internal/language/parse.go:296 +0x13b
golang.org/x/text/internal/language.parseExtension(0xc000068d08, 0x8)
/tmp/gopath300097471/pkg/mod/golang.org/x/[email protected]/internal/language/parse.go:552 +0xe74
golang.org/x/text/internal/language.parseExtensions(0xc000068d08, 0x3030000000000)
/tmp/gopath300097471/pkg/mod/golang.org/x/[email protected]/internal/language/parse.go:451 +0xa5
golang.org/x/text/internal/language.parse(0xc000068d08, 0x4d9210, 0x7, 0x3030000000000, 0x0, 0x0, 0x0, 0x0)
/tmp/gopath300097471/pkg/mod/golang.org/x/[email protected]/internal/language/parse.go:268 +0x2bc
golang.org/x/text/internal/language.Parse(0x4d9210, 0x7, 0x0, 0x0, 0x0, 0x4b1185, 0x4d9210)
/tmp/gopath300097471/pkg/mod/golang.org/x/[email protected]/internal/language/parse.go:250 +0x1c7
golang.org/x/text/language.CanonType.Parse(0x17, 0x4d9210, 0x7, 0x4d9210, 0x7, 0x0, 0x0, 0x3fc0389239a6386c)
/tmp/gopath300097471/pkg/mod/golang.org/x/[email protected]/language/parse.go:46 +0x3f
golang.org/x/text/language.Parse(...)
/tmp/gopath300097471/pkg/mod/golang.org/x/[email protected]/language/parse.go:34
golang.org/x/text/language.ParseAcceptLanguage(0x4d9210, 0x7, 0xc000068f48, 0x442bca, 0x56ed40, 0xc000032778, 0xc000068f78, 0x405e25, 0xc00005e058, 0x0)
/tmp/gopath300097471/pkg/mod/golang.org/x/[email protected]/language/parse.go:154 +0x165
main.main()
/tmp/sandbox168582112/prog.go:10 ##+0x3a
Thank you for this report @ph1048! Kindly paging @mpvl
Hmm...Gobot not working
@mengzhuo thanks for mailing the fix! To get gobot to attach to the proper issue, for any repo that isn鈥檛 the main Go repository, please use this format:
Fixes golang/go#NNNN
Change https://golang.org/cl/270697 mentions this issue: internal/language: fix resizeRange index wrong way
@odeke-em it works, thanks for the info.
Most helpful comment
@odeke-em it works, thanks for the info.