runtime: align first persistentalloc chunk as requested
authorIan Lance Taylor <ian@gcc.gnu.org>
Wed, 27 Feb 2019 15:51:49 +0000 (15:51 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Wed, 27 Feb 2019 15:51:49 +0000 (15:51 +0000)
    Backport of upstream https://golang.org/cl/163859.

    This fixes various failures on 32-bit SPARC.

    Patch from Eric Boctazou.

    Reviewed-on: https://go-review.googlesource.com/c/163860

From-SVN: r269258

gcc/go/gofrontend/MERGE
libgo/go/runtime/malloc.go

index 5b49264d0d9d07c39c8a5efbfcaacb4eb6e7d747..b2f065d66a00f184184de71cfeeeee5f1bdec62a 100644 (file)
@@ -1,4 +1,4 @@
-bc036b3a03e089e78b892067e40dbb0e7ecca9e2
+c9581de3804f94c5a74ce14befce5c57368722b9
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
index d2d869951c1a821d229749b3b96f00587a67ea09..b6a7ee11e9014cce695db72511fa9a7e4c2dbada 100644 (file)
@@ -1269,7 +1269,7 @@ func persistentalloc1(size, align uintptr, sysStat *uint64) *notInHeap {
                                break
                        }
                }
-               persistent.off = sys.PtrSize
+               persistent.off = round(sys.PtrSize, align)
        }
        p := persistent.base.add(persistent.off)
        persistent.off += size