Date: Tue, 7 Mar 2023 16:35:55 -0800 From: Mark Millard <marklmi@yahoo.com> To: Dimitry Andric <dim@FreeBSD.org>, Brooks Davis <brooks@FreeBSD.org> Cc: Lorenzo Salvadore <developer@lorenzosalvadore.it>, "salvadore@freebsd.org" <salvadore@FreeBSD.org>, FreeBSD Mailing List <freebsd-ports@freebsd.org> 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: <E558AF31-53B3-4C26-B780-237C27837BC9@yahoo.com> In-Reply-To: <1809C9AD-84B2-488D-B92B-2D753320A0B9@yahoo.com> References: <F536BC00-49D3-41F8-A328-EA10FD21E1DC.ref@yahoo.com> <F536BC00-49D3-41F8-A328-EA10FD21E1DC@yahoo.com> <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> <EB917CA9-CC67-4F79-8EBD-6BE82B021D45@yahoo.com> <B703089D-0EA6-49D4-96F9-69C09B0FF23C@yahoo.com> <4BC33DD0-E2AD-452B-AE54-9701CA01F95E@FreeBSD.org> <1809C9AD-84B2-488D-B92B-2D753320A0B9@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[I got a openSUSE tumblweed linux going on a RPi2 v1.1 (so: armv7) and installed clang 15. I show the test fails there as well.] On Mar 7, 2023, at 04:04, Mark Millard <marklmi@yahoo.com> wrote: > 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-linux/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. # uname -ap Linux localhost.localdomain 6.2.0-1-lpae #1 SMP Mon Feb 20 06:22:59 UTC = 2023 (89e2785) armv7l armv7l armv7l GNU/Linux # clang-15 -v clang version 15.0.7 Target: armv7hl-suse-linux-gnueabihf Thread model: posix InstalledDir: /usr/bin Found candidate GCC installation: = /usr/bin/../lib/gcc/armv7hl-suse-linux-gnueabi/12 Selected GCC installation: = /usr/bin/../lib/gcc/armv7hl-suse-linux-gnueabi/12 Candidate multilib: .;@m32 Selected multilib: .;@m32 # clang-15 -g -O2 partition.c ; ./a.out 0: 0x498044 : next?: 0x498044 1: 0x498050 : next?: 0x498044 2: 0x49805c : next?: 0x498044 3: 0x498068 : next?: 0x498044 4: 0x498074 : next?: 0x498074 5: 0x498080 : next?: 0x498074 6: 0x49808c : next?: 0x498074 7: 0x498098 : next?: 0x498074 8: 0x4980a4 : next?: 0x4980a4 9: 0x4980b0 : next?: 0x4980a4 10: 0x4980bc : next?: 0x4980a4 11: 0x4980c8 : next?: 0x4980a4 12: 0x4980d4 : next?: 0x4980d4 13: 0x4980e0 : next?: 0x4980d4 14: 0x4980ec : next?: 0x4980d4 15: 0x4980f8 : next?: 0x4980d4 16: 0x498104 : next?: 0x498104 17: 0x498110 : next?: 0x498104 18: 0x49811c : next?: 0x498104 19: 0x498128 : next?: 0x498104 20: 0x498134 : next?: 0x498134 21: 0x498140 : next?: 0x498134 22: 0x49814c : next?: 0x498134 23: 0x498158 : next?: 0x498134 24: 0x498164 : next?: 0x498164 25: 0x498170 : next?: 0x498164 26: 0x49817c : next?: 0x498164 27: 0x498188 : next?: 0x498164 28: 0x498194 : next?: 0x498194 29: 0x4981a0 : next?: 0x498194 30: 0x4981ac : next?: 0x498194 31: 0x4981b8 : next?: 0x498194 So: Not FreeBSD specific at all. =3D=3D=3D Mark Millard marklmi at yahoo.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E558AF31-53B3-4C26-B780-237C27837BC9>