Date: Sun, 28 Dec 2025 14:54:10 -0800 From: Mark Millard <marklmi@yahoo.com> To: js@freebsd.org Cc: Alan Somers <asomers@freebsd.org>, FreeBSD Current <freebsd-current@freebsd.org>, freebsd-arm <freebsd-arm@freebsd.org> Subject: Re: armv7 main's gpart [show]: signal 11 core dump during boot, before login; xo_format_string_direct; official pkgbase distribution (kernel and world) Message-ID: <29D0FAE4-7E72-420C-9E18-808DEAD16F72@yahoo.com> In-Reply-To: <2DDE6192-97E6-45A0-A119-6E25D9995C78@yahoo.com> References: <1B16024B-5AEC-4F75-BAC5-C6936208082F@yahoo.com> <B601D082-D458-4B81-A8D9-B55094B4A8EB@yahoo.com> <CAC9DB0D-50D0-4202-BE75-9646022A5E90@yahoo.com> <CAOtMX2ifiP=SGf1zLfeAabTy=wBnzeWrhmJ3n4DM6Oea6-%2BW8Q@mail.gmail.com> <2DDE6192-97E6-45A0-A119-6E25D9995C78@yahoo.com>
index | next in thread | previous in thread | raw e-mail
I've found a problem: use of %ld notation which is not an
invariant match to off_t and the like across FreeBSD
platforms: off_t is 64 bits across FreeBSD platoforms
but long is not (and so %ld is not):
+ xo_emit("=>{t:start/%*jd} {t:sectors/%*jd} {t:name/%*s} {:scheme} ({h:size/%ld}){t:state}\n",
. . .
+ xo_emit(" {t:start/%*jd} {t:sectors/%*jd} {P:/%*s} {ne:free}- free - ({h:size/%ld})\n",
. . .
+ xo_emit(" ({h:size/%ld})\n", pp->lg_mediasize);
. . .
+ xo_emit(" {t:start/%*jd} {t:sectors/%*jd} {P:/%*s} {ne:free}- free - ({h:size/%ld})\n",
%ld is for long but:
. . .
Architecture long void * long double time_t
aarch64 8 8 16 8
aarch64c 8 16 16 8
amd64 8 8 16 8
armv7 4 4 8 8
i386 4 4 12 4
. . .
The code would be broken in this way for i386 as well.
===
Mark Millard
marklmi at yahoo.com
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?29D0FAE4-7E72-420C-9E18-808DEAD16F72>
