public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [libgo] Fix alignment issue in persistent allocator
@ 2019-02-16 16:26 Eric Botcazou
  2019-02-27 16:20 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Botcazou @ 2019-02-16 16:26 UTC (permalink / raw)
  To: gcc-patches; +Cc: Ian Lance Taylor

[-- Attachment #1: Type: text/plain, Size: 249 bytes --]

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.

-- 
Eric Botcazou

[-- Attachment #2: p.diff --]
[-- Type: text/x-patch, Size: 414 bytes --]

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [libgo] Fix alignment issue in persistent allocator
  2019-02-16 16:26 [libgo] Fix alignment issue in persistent allocator Eric Botcazou
@ 2019-02-27 16:20 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2019-02-27 16:20 UTC (permalink / raw)
  To: Eric Botcazou; +Cc: gcc-patches

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-02-27 15:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-16 16:26 [libgo] Fix alignment issue in persistent allocator Eric Botcazou
2019-02-27 16:20 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).