From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id otbfGIuE+F+/MgAA0tVLHw (envelope-from ) for ; Fri, 08 Jan 2021 16:12:59 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id gOknFIuE+F/OSgAAbx9fmQ (envelope-from ) for ; Fri, 08 Jan 2021 16:12:59 +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 BC3159401C0 for ; Fri, 8 Jan 2021 16:12:58 +0000 (UTC) Received: from localhost ([::1]:44688 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kxuNl-0005FX-FX for larch@yhetil.org; Fri, 08 Jan 2021 11:12:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57952) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kxuNc-0005FB-QT; Fri, 08 Jan 2021 11:12:48 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39432) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kxuNb-0008Le-V7; Fri, 08 Jan 2021 11:12:47 -0500 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=60528 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 1kxuNa-00022Z-Jq; Fri, 08 Jan 2021 11:12:47 -0500 From: Jan Nieuwenhuizen To: Danny Milosavljevic Subject: Re: [Tinycc-devel] [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> <5FF806CD.1000405@gmx.de> <20210108142557.4aee550b@scratchpost.org> X-Url: http://AvatarAcademy.nl Date: Fri, 08 Jan 2021 17:12:39 +0100 In-Reply-To: <20210108142557.4aee550b@scratchpost.org> (Danny Milosavljevic's message of "Fri, 8 Jan 2021 14:25:57 +0100") Message-ID: <87wnwnmmq0.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, grischka , tinycc-devel@nongnu.org, 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: BC3159401C0 X-Spam-Score: -2.85 X-Migadu-Scanner: scn0.migadu.com X-TUID: COoUMlVwpulJ Danny Milosavljevic writes: Hi Danny, Grishka! > On Fri, 08 Jan 2021 08:16:29 +0100 > grischka wrote: > >> But no such thing happens in this case. The 'ptr' in init_putv() >> comes from >>=20 >> ptr =3D sec->data + c; >>=20 >> and it seems that if tcc is doing the right thing then 'c' cannot >> be misaligned, and if malloc/realloc on that system is doing the >> right thing, then sec->data cannot be misaligned either. So...? > > How does tcc allocate dynamic memory? I've tried to find out, but > tcc_malloc is defined to be "use_tcc_malloc", which I don't find > anywhere. Does it use libc malloc for that ? > > (With MEM_DEBUG defined, tcc_malloc_debug seems to use malloc. But > what about without MEM_DEBUG defined ?) > > If so, is libc malloc supposed to ensure alignment of allocated memory? > > According to https://man7.org/linux/man-pages/man3/malloc.3.html yes. > > @Janneke: So our mes libc malloc should be aligning the stuff--but it's n= ot > doing it. So it's a bug in our libc. Beautiful! Maybe this explains other differences we saw between aarch64-linux and arm-linux? Greetings, Janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com