From nobody Tue Mar 07 12:59:41 2023 X-Original-To: freebsd-ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PWFsW6r01z3w7hL for ; Tue, 7 Mar 2023 12:59:59 +0000 (UTC) (envelope-from developer@lorenzosalvadore.it) Received: from mail-4323.proton.ch (mail-4323.proton.ch [185.70.43.23]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "protonmail.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PWFsW2DmHz3sQ5; Tue, 7 Mar 2023 12:59:58 +0000 (UTC) (envelope-from developer@lorenzosalvadore.it) Authentication-Results: mx1.freebsd.org; none Date: Tue, 07 Mar 2023 12:59:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lorenzosalvadore.it; s=protonmail2; t=1678193995; x=1678453195; bh=HtM9gzdcc2UnWgp5ighAT/vBJH3sBUDkL+AyN61o/X4=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=vZVG5Hn0IGDOp/lONXMqrbambIrxl1oFxg4M/QQmnFuYGzxeSS34Yv2KNYnxmLa5h wS+NjE84f2tqGYmnkpKTXASMN6ybSnc5q0WDJAM19fJNm4546lPWSZYqTdoaL6nDBc EoU3tUQ38lYkJtjbdQVwDGKpoBAdndJ/ZW6VJ8DWN0mKR3N1Whkw3LXiAFn4A5UCwx c3WUlOJD4T63SIfyBgJ0hwhATKfxDbSVwyyumbBLp5rluEmXUYGaQW17h5ubT59UCA shc70K/z9ZubM9JnShDB1XLHwj0t4b1lIo9GxzYQNpNBrvhI8sFy4JyYNiJUN5j9vh 1ldGy2gZOSoxg== To: Mark Millard From: Lorenzo Salvadore Cc: Dimitry Andric , Brooks Davis , "salvadore@freebsd.org" , FreeBSD Mailing List Subject: Re: armv7 lang/gcc12 "no bootstrap" build via system clang 15.0.7 based poudriere build ends up stuck in a small loop Message-ID: <4h9b7F7uHqakHYda1FzRaU2h4ctmY-I3dR7Aqm4C1cxyK8CX2-NuMf-fj8tcgA9vOjzHQ4gRdyFLDHLsDcZCGxs-TJFF_ByG8uI3W6yQcVA=@lorenzosalvadore.it> In-Reply-To: <1809C9AD-84B2-488D-B92B-2D753320A0B9@yahoo.com> References: <2HOLCFE6Z_cOyGycU4ZBU7Lf6kcqohVx7tiLiRLzdjMEc6a8DFeH1IaJqdPNJOqFVTh1MGE7_UUJLcg2gg0UbTZIHZl72NbaNEsqrJwJ3xA=@lorenzosalvadore.it> <93707ED2-F529-49DE-A018-794827F56247@yahoo.com> <7AA0AE73-87CC-4B26-92B2-A0EC4281F429@yahoo.com> <480C8278-DC30-40D6-AED2-F52F59E78EBC@yahoo.com> <4BC33DD0-E2AD-452B-AE54-9701CA01F95E@FreeBSD.org> <1809C9AD-84B2-488D-B92B-2D753320A0B9@yahoo.com> Feedback-ID: 53711648:user:proton List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4PWFsW2DmHz3sQ5 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:62371, ipnet:185.70.43.0/24, country:CH] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N ------- Original Message ------- On Tuesday, March 7th, 2023 at 1:04 PM, Mark Millard wr= ote: >=20 >=20 > On Mar 7, 2023, at 03:45, Dimitry Andric dim@FreeBSD.org wrote: >=20 > > On 7 Mar 2023, at 11:26, Mark Millard marklmi@yahoo.com wrote: > >=20 > > > Below is a small example C source showing the clang 15+ armv7 > > > problem that leads to the unbounded looping in later code in > > > the lang/gcc12+ builds: a data structure is mis-initialized, > > > breaking its invariant properties used by the later code > > > structure. > > > ... > > > In the output below, note the blocks of 4 "next" > > > values that do not change. Each should match the > > > earlier hexadecimal value on the same line: point > > > back to same element of the array. 3 of 4 do not. > > >=20 > > > # cc -g -O2 partition.c > > > # ./a.out > > > 0: 0x40a84 : next?: 0x40a84 > > > 1: 0x40a90 : next?: 0x40a84 > > > 2: 0x40a9c : next?: 0x40a84 > > > 3: 0x40aa8 : next?: 0x40a84 > >=20 > > Very strange, I don't see this at all here. All the values are always > > correct, at every optimization level. I tried clang 13, clang 14, clang > > 15 from base and clang 15 from ports. However, my architecture is amd64= , > > so maybe you are running into a armv7 specific issue? >=20 >=20 > Yep: aarch64 and amd64 gcc builds all worked fine > via system-clang 15 and the test case also works > fine in my context on those. (All platforms > have FreeBSD built from copies of the same > source code.) >=20 > It is only on armv7 that I got the gcc build > problems and the test case failures. >=20 > FYI: >=20 > aarch64 Fedora 37 using clang-15 also works > fine for me (only tried the test case, not > gcc builds): >=20 > # clang-15 -g -O2 partition.c ; ./a.out > 0: 0x420038 : next?: 0x420038 > 1: 0x420048 : next?: 0x420048 > 2: 0x420058 : next?: 0x420058 > 3: 0x420068 : next?: 0x420068 > 4: 0x420078 : next?: 0x420078 > 5: 0x420088 : next?: 0x420088 > 6: 0x420098 : next?: 0x420098 > 7: 0x4200a8 : next?: 0x4200a8 > 8: 0x4200b8 : next?: 0x4200b8 > 9: 0x4200c8 : next?: 0x4200c8 > 10: 0x4200d8 : next?: 0x4200d8 > 11: 0x4200e8 : next?: 0x4200e8 > 12: 0x4200f8 : next?: 0x4200f8 > 13: 0x420108 : next?: 0x420108 > 14: 0x420118 : next?: 0x420118 > 15: 0x420128 : next?: 0x420128 > 16: 0x420138 : next?: 0x420138 > 17: 0x420148 : next?: 0x420148 > 18: 0x420158 : next?: 0x420158 > 19: 0x420168 : next?: 0x420168 > 20: 0x420178 : next?: 0x420178 > 21: 0x420188 : next?: 0x420188 > 22: 0x420198 : next?: 0x420198 > 23: 0x4201a8 : next?: 0x4201a8 > 24: 0x4201b8 : next?: 0x4201b8 > 25: 0x4201c8 : next?: 0x4201c8 > 26: 0x4201d8 : next?: 0x4201d8 > 27: 0x4201e8 : next?: 0x4201e8 > 28: 0x4201f8 : next?: 0x4201f8 > 29: 0x420208 : next?: 0x420208 > 30: 0x420218 : next?: 0x420218 > 31: 0x420228 : next?: 0x420228 >=20 > # clang-15 -v > clang version 15.0.7 (Fedora 15.0.7-1.fc37) > Target: aarch64-redhat-linux-gnu > Thread model: posix > InstalledDir: /usr/bin > Found candidate GCC installation: /usr/bin/../lib/gcc/aarch64-redhat-linu= x/12 > Selected GCC installation: /usr/bin/../lib/gcc/aarch64-redhat-linux/12 > Candidate multilib: .;@m64 > Selected multilib: .;@m64 >=20 > If I understand right, Lorenzo indicates that he has > more failing contexts. I've no evidence of my own of > such. I am sorry, I was in a hurry and I read Mark's email too quickly. Then now I have stopped, read more carefully, rerun the tests and everything works as intended instead. So, the testcode works correctly at all optmization levels on FreeBSD amd64 and Linux OpenSuse amd64, at least on my machine. I am sorry for my mistake. Cheers, Lorenzo Salvadore