Message ID | 2320575.aka1Yb8TTl@polaris |
---|---|
State | New |
Headers | show |
Series | [libgo] Fix alignment issue in persistent allocator | expand |
On Sat, Feb 16, 2019 at 8:26 AM Eric Botcazou <ebotcazou@adacore.com> wrote: > > 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 <ebotcazou@adacore.com> > > * go/runtime/malloc.go (persistentalloc1): Always align the offset. Thanks, committed to mainline. Also sent upstream as https://golang.org/cl/163859. Ian
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