We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
go version
$ go version go version go1.18beta1 linux/amd64
Yes, and it's a regression from go1.17.
go env
$ go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/lizf/.cache/go-build" GOENV="/home/lizf/.config/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/home/lizf/hny/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/lizf/hny/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/snap/go/current" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/snap/go/current/pkg/tool/linux_amd64" GOVCS="" GOVERSION="go1.18beta1" GCCGO="gccgo" GOAMD64="v1" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/dev/null" GOWORK="" 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-build1152832268=/tmp/go-build -gno-record-gcc-switches"
$ cat badasm.go package badasm const _literalsBlockType_name = "literalsBlockRawliteralsBlockRLEliteralsBlockCompressedliteralsBlockTreeless" $ cat foo_amd64.s #include "go_asm.h" $ GO111MODULE=off go build # _/tmp/repro go_asm.h:3:39: literal not terminated ./foo_amd64.s:2: missing newline in definition for macro: const__literalsBlockType_name $ echo $? 2 $ GO111MODULE=off GOROOT=/snap/go/8839 /snap/go/8839/bin/go build $ echo $? 0 $ go tool compile -asmhdr out.h badasm.go $ cat out.h // generated by compile -asmhdr from package badasm #define const__literalsBlockType_name "literalsBlockRawliteralsBlockRLEliteralsBlockCompressedliteralsBlock...
Successful build, with a properly constructed const__literalsBlockType_name value that is not truncated
const__literalsBlockType_name
Failed build, because the string value of const__literalsBlockType_name is never terminated.
The text was updated successfully, but these errors were encountered:
Change https://golang.org/cl/377074 mentions this issue: cmd/compile: use exact constant in go_asm.h
cmd/compile: use exact constant in go_asm.h
Sorry, something went wrong.
8b9b365
1bc86d1
Fixes golang#50523 Change-Id: Idab1b44d106250e9301d90ee6571f0ea51242dd9 Reviewed-on: https://go-review.googlesource.com/c/go/+/377074 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Liz Fong-Jones <lizf@honeycomb.io> Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com> Trust: Emmanuel Odeke <emmanuel@orijtech.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
No branches or pull requests
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, and it's a regression from go1.17.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
Successful build, with a properly constructed
const__literalsBlockType_name
value that is not truncatedWhat did you see instead?
Failed build, because the string value of
const__literalsBlockType_name
is never terminated.The text was updated successfully, but these errors were encountered: