From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 7192 invoked from network); 9 Aug 2021 09:14:57 -0000 Received: from 1ess.inri.net (216.126.196.35) by inbox.vuxu.org with ESMTPUTF8; 9 Aug 2021 09:14:57 -0000 Received: from mout02.posteo.de ([185.67.36.66]) by 1ess; Sun Aug 8 10:54:26 -0400 2021 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 4862B240103 for <9front@9front.org>; Sun, 8 Aug 2021 16:54:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1628434450; bh=PYXHVuO2fs+lnPu5JByyG+37dO5Z4T9XpWy4WUPWVLo=; h=From:To:Cc:Subject:Date:Autocrypt:OpenPGP:From; b=DNGQcMJXepqeel3O4Yqeb32epixSR9eLsrMhUzrIHsZSsFXGuvtY35n1yI5bUjw76 zHJBmgMsBp3JvwSwVZO2CEsIZeCHXdQJmVg9V05CqVWSQBmKeX7XuLMAvNyDMXagnD E8PyAGBhVyeKS8TbZdyv2eHDcxPtivql3LTcKUARL8nJjH4crbOeVRa71AdBJjrKT0 fOJ7VDZx0tWPVl/nJrx3pYMl+2OAvzAw795Jlc1J5eDvLBhHsN12JjCy4KuqnexTfD pFqX0nlf1xiKTopchBcX9ts9KiiVF7hicc0Vyoj3+K9AwLYyk6C0xuiavh+t3RRiN7 9aUg8gfzIr0kg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4GjMg54H69z9rxN; Sun, 8 Aug 2021 16:54:09 +0200 (CEST) From: Emery Hemingway To: Xiao-Yong Jin Cc: <9front@9front.org>, Adrian Siekierka Date: Sun, 08 Aug 2021 14:54:09 +0000 MIME-Version: 1.0 Message-ID: <0e33e60b-911a-4743-8d3e-e6bf85643157@posteo.net> In-Reply-To: <14C92255-A517-4EBA-A944-9FBAC3B1D728@gmail.com> References: <981ff1ef-7de9-4b86-b481-17c586c1848e@posteo.net> <20cccf71-092d-fe36-2933-6b3fe6bb5caa@gmail.com> <53ac86bf-b111-4d2b-afd0-088687fca7f8@posteo.net> <14C92255-A517-4EBA-A944-9FBAC3B1D728@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Autocrypt: addr=ehmry@posteo.net; keydata=xsBNBF1BoioBCADOYXWr+A7xudg62sSzl0A2O1rZ3lEOje0lw7NPixDQ8+lI2vRPLdSTZ+0ZaGTISMEHF9yDi1bOFjqhkLKrZBizAT+wdy8ObD6N+cSg+ic/uuYl+C0CsADvkNJOqeFOEMJVv6nf1MuEEhBSh7vVFzqgMsMXt+MeapavS8ekuqJPSjcqNM015aImYQ+KaRD5rAg5u+0T4RDf4uo4MF+mG7yA7kU6XmRS4qr5jbSFwdbW4HCP9mbiN10sUycRy7DnguCRBbZFGwNt9LAsfxo7myUQaouXzvdHW72blNgaAF6XZltBQci5/XHZeTN/dUWK39qyVe94AZKEA5jpy/nEOhk5ABEBAAHNEGVobXJ5QHBvc3Rlby5uZXTCwJQEEwEIAD4CGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AWIQSB2rYGbPQhlnvVuDNMe4+9c/FyWgUCXUGihgUJAdJ3dgAKCRBMe4+9c/FyWgFCCACPYeyXNZiB9qZOYXMCpDCWdKvAm+iww63gnjilI/JK4Ut2io591o58RPyChn8tAlqXyvsxYhS8jqvM1XQs8wZ7b6r4PUVWMfNRgzk2TNdzth2IbytMZKwsiGYk4gdXM+UvfrzfsSRRIhMyhx3adZpQIpDLbN60dotR8hkLVdkZyN1DZp7EWfYRAwJhg4LP3CcKiSd7u3EvZHcxg2J1gJQo12FG+xjaq9b0WyuP6lLU98zlwBkHy3MPJmSIs1QzXC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UKum/ZLLxqpzMet1m5tQtqSvwBFromLZwqeuGlPdJvoAXTu3gQP3r8MaEovn89XRAyg90Flu4cRAyUZErxwGNYFqlV3QD6tGXTR1RfpZqNGVqxE 3yNvLBZwKud6rUmK/+7cvHlc9pDrCkbieu8hNSsTYxnLNGZYnRJbwy/klB0+7k/s83KfZ5l860TKQLQMl89Qw4cG/kwDw== OpenPGP: url=https://posteo.de/keys/ehmry@posteo.net.asc List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: webscale polling SSL standard standard Subject: Re: [9front] Nim lang, C alignment support Reply-To: 9front@9front.org Precedence: bulk Hello Jin, On Saturday 7 August 2021 00:25:58 CEST, Xiao-Yong Jin wrote: > What exactly happens when the executables run? Do you have the Nim > compiler bootstrapped on 9front? Or do you just try to compile the > C code generated from other host OS? Nim executables seem to run until memory starts being freed. It's a double-free panic in pool.c or else I get a stack-trace leading to gc.nim. Simple programs are usable, I have the compiler bootstrapped enough to print it's version and usage message to stdout, but with any load it will dealloc and break. > Did you try to turn off all the extra checks and just use malloc, like, > > =09-d:danger --panics:on --gc:arc -d:useMalloc I've tried these and --gc:orc but things seem to break in the same way. > If I understand correctly, the only place that relies on the alignment > is Nim's allocator, for whatever reason, and it did not appear until > late 2019 as an optimization and safety guarantees for dynamic libraries. > If you can figure out where it actually "goes to shit", you might be > able to avoid using alignment at all. I think you are right, it may be possible to disable some optimizations, I'll see what I can do. If anyone is curious I've documented the bootstrapping process. https://github.com/ehmry/Nim/tree/plan9#readme Thanks for the encouragement, Emery