From: Russ Cox Date: Wed, 6 May 2015 01:55:09 +0000 (-0400) Subject: runtime: fix TestLFStack on 386 X-Git-Tag: go1.5beta1~655 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=8f037fa1ab223f48750117219cd4fff8c6575970;p=gostls13.git 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/9787 Reviewed-by: Brad Fitzpatrick Reviewed-by: David Chase --- diff --git a/src/runtime/lfstack_test.go b/src/runtime/lfstack_test.go index 68f221d6ef..4da4d88619 100644 --- a/src/runtime/lfstack_test.go +++ b/src/runtime/lfstack_test.go @@ -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