The new(uint64) was moving to the stack, which may not be aligned.
Change-Id: Iad070964202001b52029494d43e299fed980f939
Reviewed-on: https://go-review.googlesource.com/9787
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: David Chase <drchase@google.com>
return (*MyNode)(unsafe.Pointer(node))
}
+var global interface{}
+
func TestLFStack(t *testing.T) {
stack := new(uint64)
+ global = stack // force heap allocation
+
// Need to keep additional referenfces to nodes, the stack is not all that type-safe.
var nodes []*MyNode