-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: invalid pointer found on stack when compiled with -race [1.21 backport] #63743
Comments
This is a rare but serious miscompilation, causing invalid pointers to be seen by the garbage collector. |
Change https://go.dev/cl/538717 mentions this issue: |
Change https://go.dev/cl/538857 mentions this issue: |
Closed by merging caacf3a to release-branch.go1.21. |
…in dead store elimination Update #63743 Change-Id: I163c6038c13d974dc0ca9f02144472bc05331826 Reviewed-on: https://go-review.googlesource.com/c/go/+/538595 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: David Chase <[email protected]> Reviewed-by: Keith Randall <[email protected]> (cherry picked from commit 43b57b8) Reviewed-on: https://go-review.googlesource.com/c/go/+/538857 Auto-Submit: Heschi Kreinick <[email protected]> Reviewed-by: Heschi Kreinick <[email protected]>
…s after the nil check Have nil checks return a pointer that is known non-nil. Users of that pointer can use the result, ensuring that they are ordered after the nil check itself. The order dependence goes away after scheduling, when we've fixed an order. At that point we move uses back to the original pointer so it doesn't change regalloc any. This prevents pointer arithmetic on nil from being spilled to the stack and then observed by a stack scan. Fixes #63743 Change-Id: I1a5fa4f2e6d9000d672792b4f90dfc1b7b67f6ea Reviewed-on: https://go-review.googlesource.com/c/go/+/537775 Reviewed-by: David Chase <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Keith Randall <[email protected]> (cherry picked from commit 962ccbe) Reviewed-on: https://go-review.googlesource.com/c/go/+/538717 Auto-Submit: Heschi Kreinick <[email protected]> Reviewed-by: Heschi Kreinick <[email protected]>
@randall77 requested issue #63657 to be considered for backport to the next 1.21 minor release.
The text was updated successfully, but these errors were encountered: