-
Notifications
You must be signed in to change notification settings - Fork 18k
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
internal/fuzz: array literal initialization causes ICE "unhandled stmt ASOP" while fuzzing #56105
Comments
On reading #52673 (comment), this definitely seems related to 0bd7408. @cuonglm I hope you don't mind a ping as the author there. |
Thanks for reporting. I think the problem is just that the code generated for fuzzing is not properly process, commit 0bd7408 seems reveals the bug. Will send the fix shortly. |
Change https://go.dev/cl/440455 mentions this issue: |
@mdempsky @randall77 should we backport this? |
Looking briefly at the CL on my phone, it seems fine to backport yeah. Thanks for looking into it. For the test case, can we just use a |
Ah right, forgot about @gopherbot please backport this to go1.19 |
Backport issue(s) opened: #56106 (for 1.19). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases. |
My first analysis is wrong, 0bd7408 actually introduces this bug. After ordering the static init codes, we still need to apply walk pass before appending them to parent init. |
CL 403995 fixed static init of literal contains dynamic exprs, by ensuring their init are ordered properly. However, we still need to walk the generated init codes before appending to parent init. Otherwise, codes that requires desugaring will be unhandled, causing the compiler backend crashing. Fixes golang#56105 Change-Id: Ic25fd4017473f5412c8e960a91467797a234edfd Reviewed-on: https://go-review.googlesource.com/c/go/+/440455 Reviewed-by: Matthew Dempsky <mdempsky@google.com> Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Keith Randall <khr@google.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Keith Randall <khr@golang.org>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes:
What operating system and processor architecture are you using (
go env
)?darwin/arm64, linux/arm64
What did you do?
Run
go test -fuzz .
in a package containing this file:https://go.dev/play/p/T2-Smn6iHXV
What did you expect to see?
Nothing.
What did you see instead?
Notes
go fuzz
run against it.go build
andgo test
have no problem with this code.The text was updated successfully, but these errors were encountered: