Commit 8f037fa1 authored by Russ Cox's avatar Russ Cox

runtime: fix TestLFStack on 386

The new(uint64) was moving to the stack, which may not be aligned.

Change-Id: Iad070964202001b52029494d43e299fed980f939
Reviewed-on: https://go-review.googlesource.com/9787Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: default avatarDavid Chase <drchase@google.com>
parent 351897d9
......@@ -24,8 +24,12 @@ func toMyNode(node *LFNode) *MyNode {
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment