-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/compile: libFuzzer instrumentation fakePC overflow on 386 arch #56141
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
@randall77 @mdempsky seems we need to backport this, it affect |
Change https://go.dev/cl/441996 mentions this issue: |
Re-open for backport consideration. |
@gopherbot please open a backport to 1.19. This bug causes libfuzzer mode to fail to compile. There is no easy workaround. |
Backport issue(s) opened: #56167 (for 1.18), #56168 (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. |
Yes, this does not happen in go1.18 release. The libfuzzerTrace* and friends are added in 1.19 |
fakePC uses hash.Sum32, which returns an uint32. However, libfuzzer trace/hook functions declare fakePC argument as int, causing overflow on 386 archs. Fixing this by changing fakePC argument to uint to prevent the overflow. Fixes golang#56141 Change-Id: I3994c461319983ab70065f90bf61539a363e0a2a Reviewed-on: https://go-review.googlesource.com/c/go/+/441996 Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Keith Randall <khr@google.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
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
)?go env
OutputWhat did you do?
Compile following program with
-d=libfuzzer
:What did you expect to see?
Compile ok.
What did you see instead?
The text was updated successfully, but these errors were encountered: