This gets rid of a bunch of Go failures on SPARC.
Tested on x86-64/Linux, SPARC/Solaris and SPARC64/Linux.
2019-02-16 Eric Botcazou <ebotca...@adacore.com>
* go/runtime/malloc.go (persistentalloc1): Always align the offset.
--
Eric Botcazou
Index: go/runtime/malloc.go
===================================================================
--- go/runtime/malloc.go (revision 268849)
+++ go/runtime/malloc.go (working copy)
@@ -1269,7 +1269,7 @@ func persistentalloc1(size, align uintpt
break
}
}
- persistent.off = sys.PtrSize
+ persistent.off = round(sys.PtrSize, align)
}
p := persistent.base.add(persistent.off)
persistent.off += size