Date: Mon, 7 Mar 2022 19:14:21 +0000 From: Jessica Clarke <jrtc27@freebsd.org> To: Mark Johnston <markj@freebsd.org> Cc: John Baldwin <jhb@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 3fe1f21fb364 - main - ctf: Avoid passing a caddr_t to roundup2() Message-ID: <C7071C6A-86D4-48D7-9B6B-DBBC90C2E366@freebsd.org> In-Reply-To: <YiZYTgdCMoee26WY@nuc> References: <202203071621.227GL47F099339@gitrepo.freebsd.org> <cf9a811d-f985-f699-442b-a5c323b98ab4@FreeBSD.org> <YiZYTgdCMoee26WY@nuc>
next in thread | previous in thread | raw e-mail | index | archive | help
On 7 Mar 2022, at 19:09, Mark Johnston <markj@freebsd.org> wrote: >=20 > On Mon, Mar 07, 2022 at 11:04:51AM -0800, John Baldwin wrote: >> On 3/7/22 8:21 AM, Mark Johnston wrote: >>> The branch main has been updated by markj: >>>=20 >>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D3fe1f21fb364e38f2bf7e7100dad59b0= 67b27080 >>>=20 >>> commit 3fe1f21fb364e38f2bf7e7100dad59b067b27080 >>> Author: Mark Johnston <markj@FreeBSD.org> >>> AuthorDate: 2022-03-07 16:18:40 +0000 >>> Commit: Mark Johnston <markj@FreeBSD.org> >>> CommitDate: 2022-03-07 16:20:57 +0000 >>>=20 >>> ctf: Avoid passing a caddr_t to roundup2() >>>=20 >>> For some reason I can't reproduce this locally, but Jenkins = complains. >>>=20 >>> Reported by: Jenkins >>> Fixes: bdf290cd3e1a ("ctf: Add v3 support to CTF tools, = ctf{convert,dump,merge}") >>=20 >> Odd, do you have a copy of the warning/error you got (and which = compiler and arch?) >=20 > /usr/src/cddl/contrib/opensolaris/tools/ctf/cvt/ctf.c:1336:11: error: = invalid operands to binary expression ('caddr_t' (aka 'char *') and = 'int') > dptr =3D roundup2(dptr, 4); > ^~~~~~~~~~~~~~~~~ > /usr/include/sys/param.h:310:38: note: expanded from macro 'roundup2' > #define roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) /* if y is powers = of two */ > ~~~~~~~~~~~~~^~~~~~~~~~~ >=20 > I'm not sure which compiler was in use. All platforms failed. >=20 > I later tried building world in a 13.0-RELEASE amd64 jail, and that > reproduced the failure. So maybe the version of LLVM shipped there > (11.0) is more picky? 8fa6abb6f4f6 ("Expose clang's alignment builtins and use them for roundup2/rounddown2=E2=80=9D) is in main and MFC=E2=80=99ed stable/13 = but not releng/13.0 so any native tool builds on FreeBSD versions prior to that need the cast to work. Linux and macOS builds work because we always use the in-tree compatibility headers for native tools, it=E2=80=99s = just older FreeBSD hosts, and world itself is of course always built against the in-tree headers rather than the host=E2=80=99s, regardless of OS. Jess
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C7071C6A-86D4-48D7-9B6B-DBBC90C2E366>