From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id KCTAG0qF+F+/MgAA0tVLHw (envelope-from ) for ; Fri, 08 Jan 2021 16:16:10 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id CMiGF0qF+F/dQgAAB5/wlQ (envelope-from ) for ; Fri, 08 Jan 2021 16:16:10 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id ED0DD9403E8 for ; Fri, 8 Jan 2021 16:16:09 +0000 (UTC) Received: from localhost ([::1]:51714 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kxuQq-00007R-MY for larch@yhetil.org; Fri, 08 Jan 2021 11:16:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59222) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kxuQK-0008Gt-Br for guix-devel@gnu.org; Fri, 08 Jan 2021 11:15:39 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39502) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kxuQI-00010c-NU; Fri, 08 Jan 2021 11:15:34 -0500 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=37578 helo=dundal.janneke.lilypond.org) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kxuQF-00079j-E3; Fri, 08 Jan 2021 11:15:32 -0500 From: Jan Nieuwenhuizen To: Danny Milosavljevic Subject: Re: [bootstrappable] Re: wip-full-source-bootstrap: from a 357-byte `hex0' to 'hello' Organization: AvatarAcademy.nl References: <87im8cvdpa.fsf@gnu.org> <36b3777d90af6fa2e1c1778ba183111e@codethink.co.uk> <87lfd5rpr8.fsf@gnu.org> <20210107211058.40e0813a@scratchpost.org> <20210107212324.36bfd236@scratchpost.org> <20210107235208.04835b95@scratchpost.org> <87ble0ueq7.fsf@gnu.org> <20210108144347.12d82f90@scratchpost.org> <20210108150725.591cfd31@scratchpost.org> X-Url: http://AvatarAcademy.nl Date: Fri, 08 Jan 2021 17:15:24 +0100 In-Reply-To: <20210108150725.591cfd31@scratchpost.org> (Danny Milosavljevic's message of "Fri, 8 Jan 2021 15:07:25 +0100") Message-ID: <87sg7bmmlf.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org, Paul Sherwood , bootstrappable@freelists.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.85 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: ED0DD9403E8 X-Spam-Score: -2.85 X-Migadu-Scanner: scn0.migadu.com X-TUID: EofmW0sRM47Z Danny Milosavljevic writes: Hi Danny, > I propose to, instead, change mes libc to align stuff malloc returns like= this: > > That should fix it. That's great; I'd like to go test this. Would you like to push to "wip" when you're ready? > diff --git a/include/stddef.h b/include/stddef.h > index a597c9bb..a682d726 100644 > --- a/include/stddef.h > +++ b/include/stddef.h > @@ -37,6 +37,10 @@ > #endif // !__MESC__ > #endif // offsetof >=20=20 > +/* TODO: On armhf gcc, max_align_t is 16 Byte big instead. Use that? */ > + > +typedef double max_align_t; > + > #endif // ! SYSTEM_LIBC Is this something you can get more info on, or do we just try it like this? > #endif // __MES_STDDEF_H > diff --git a/lib/stdlib/malloc.c b/lib/stdlib/malloc.c > index f4be4de1..aaf99886 100644 > --- a/lib/stdlib/malloc.c > +++ b/lib/stdlib/malloc.c > @@ -20,6 +20,8 @@ >=20=20 > #include > #include > +#include > +#include >=20=20 > /* FIXME: We want bin/mes-mescc's x86-linux sha256sum to stay the same. > Therfore we cannot remove stdlib/malloc from libc_SOURCES, which is > @@ -37,6 +39,8 @@ malloc (size_t size) > { > if (!__brk) > __brk =3D (char *) brk (0); > + /* align what we give back. */ > + __brk =3D (char*) (((uintptr_t) __brk + sizeof(max_align_t) - 1) & -si= zeof(max_align_t)); > if (brk (__brk + size) =3D=3D -1) > return 0; > char *p =3D __brk; Very nice, thanks!! Janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com