mirror of
https://github.com/golang/go
synced 2024-11-18 07:04:52 -07:00
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>
This commit is contained in:
parent
351897d9d4
commit
8f037fa1ab
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user