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: miscompilation in pointer operations #52957

Closed
ddaa2000 opened this issue May 18, 2022 · 6 comments
Closed

cmd/compile: miscompilation in pointer operations #52957

ddaa2000 opened this issue May 18, 2022 · 6 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@ddaa2000
Copy link

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?

Yes

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

go env Output
$ go env
$ go env
set GO111MODULE=on
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\ddaa\AppData\Local\go-build
set GOENV=C:\Users\ddaa\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\ddaa\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\ddaa\go
set GOPRIVATE=
set GOPROXY=https://goproxy.cn,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\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=D:\programing\go\bugReview\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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\ddaa\AppData\Local\Temp\go-build2453048728=/tmp/go-build -gno-rec
ord-gcc-switches

What did you do?

https://go.dev/play/p/PzaV1hSZ5QG

What did you expect to see?

Print {true}

What did you see instead?

Print {false}
Though similar to:
#52953
This bug can be triggered by go version lower than 1.16, while the above one can only be triggered by 1.17 and 1.18

@bcmills
Copy link
Contributor

bcmills commented May 18, 2022

It looks like this input was found through fuzzing, but it's a very non-minimal input — which makes it difficult to debug.

Can you configure the fuzzer to perform at least simple minimizations to produce clearer bug reports?

@mknyszek mknyszek added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label May 18, 2022
@mknyszek mknyszek added this to the Backlog milestone May 18, 2022
@mknyszek
Copy link
Contributor

CC @golang/runtime

@ericlagergren
Copy link
Contributor

Here's a minimal repro: https://go.dev/play/p/u_srbI_bWXm

It seems almost identical to #52953.

@ericlagergren
Copy link
Contributor

@cherrymui's CL 407014 also fixes this bug.

@bcmills
Copy link
Contributor

bcmills commented May 18, 2022

I think the fact that this also reproduces on 1.16 is likely a red herring: the pre-1.17 bug may well have been fixed in 1.17.

(And note that 1.16 is no longer supported and not receiving backport fixes.)

@bcmills
Copy link
Contributor

bcmills commented May 18, 2022

Duplicate of #52953

@bcmills bcmills marked this as a duplicate of #52953 May 18, 2022
@bcmills bcmills closed this as completed May 18, 2022
@golang golang locked and limited conversation to collaborators May 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

5 participants