Date: Mon, 3 May 2021 11:08:45 -0700 From: Mark Millard <marklmi@yahoo.com> To: bob prohaska <fbsd@www.zefox.net> Cc: freebsd-arm <freebsd-arm@freebsd.org>, freebsd-ports@freebsd.org Subject: Re: Xoscope nuisance console messages on Pi4 running -current Message-ID: <BF735352-5E94-4189-8F7E-2D4F991F6489@yahoo.com> In-Reply-To: <20210503152339.GA37236@www.zefox.net> References: <20210503063701.GA34665@www.zefox.net> <263BF9DF-B22B-4579-9667-AFCB7D2D667C@yahoo.com> <20210503152339.GA37236@www.zefox.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2021-May-3, at 08:23, bob prohaska <fbsd at www.zefox.net> wrote: > On Mon, May 03, 2021 at 01:00:03AM -0700, Mark Millard via = freebsd-ports wrote: > [detailed code tour omitted] >=20 >>=20 >> My guess would be xoscope used a signed 32-bit type >> that got a value with sign extension to 64 bits >> before the value started being treated as unsigned. >> If it had used an unsigned type instead, the padding >> would have been a zero fill instead (presuming that >> I've guessed right). >>=20 >=20 > So this was an artifact of compiling a 32 program on a 64 bit machine? I've no evidence that you were building the port for armv7 instead of aarch64. If you were, it would be good to report that. Otherwise, I expect the code produced was 64-bit (aarch64) and the rest is just how the program's source code is set up. > And, perhaps unnecessary use of signed versus unsigned integers?=20 That is what I expect is going on in the xoscope source code. (I've not looked.) > This begs two more questions: It is harmless (seemingly not always),=20= I doubt that it is a problem (other than the messages). As I wrote: QUOTE While I do not know the specifics for the command and command group encoding, the truncated value seems coherent with the code that is using it. END QUOTE > and would it go away if compiled and run on a 32 bit machine, say = armv7? "long int" and "int" are both 32-bits on armv7 (unsigned or signed) so no extra 1-bits would be produced by sign extension. So I do not expect the messages would be generated when executed via armv7 code. As far as I can tell, the program likely works (ignoring the messages) for aarch64. The messages are from the FreeBSD you are using being a debug build with INVARIANTS enabled. A non-debug FreeBSD build would not report the messages. (It is possible to buildworld for armv7 and install it into a directory tree and use chroot into that directory tree to run armv7 code on the RPi4's. This should not produce the messages --and if it did then there would be FreeBSD code to change for that kind of context.) > Many thanks for the detailed explanation, but I'll admit not = understanding > much more than the quoted part above 8-( =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BF735352-5E94-4189-8F7E-2D4F991F6489>