mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.ssa] cmd/compile: be safer about uintptr/unsafe.Pointer conversions
Make sure that when a pointer value is live across a function call, we save it as a pointer. (And similarly a uintptr live across a function call should not be saved as a pointer.) Add a nasty test case. This is probably what is preventing the merge from master to dev.ssa. Signs point to something like this bug happening in mallocgc. Change-Id: Ib23fa1251b8d1c50d82c6a448cb4a4fc28219029 Reviewed-on: https://go-review.googlesource.com/16830 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
parent
74e568f43a
commit
7807bda91d
10 changed files with 203 additions and 17 deletions
|
|
@ -93,3 +93,5 @@ func TestZero(t *testing.T) { runTest(t, "zero_ssa.go") }
|
|||
func TestAddressed(t *testing.T) { runTest(t, "addressed_ssa.go") }
|
||||
|
||||
func TestCopy(t *testing.T) { runTest(t, "copy_ssa.go") }
|
||||
|
||||
func TestUnsafe(t *testing.T) { runTest(t, "unsafe_ssa.go") }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue