diff options
author | Russ Cox <rsc@golang.org> | 2015-05-05 21:55:09 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2015-05-11 15:21:54 +0000 |
commit | 8f037fa1ab223f48750117219cd4fff8c6575970 (patch) | |
tree | 2277c4eefc8b599aa37a9a4867aee80987fef8bc /src/runtime/lfstack_test.go | |
parent | 351897d9d4f61dba5bd19270463c393a58d1f2ce (diff) | |
download | go-8f037fa1ab223f48750117219cd4fff8c6575970.tar.gz go-8f037fa1ab223f48750117219cd4fff8c6575970.zip |
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 <bradfitz@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/runtime/lfstack_test.go')
-rw-r--r-- | src/runtime/lfstack_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
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 |