From halmurray at sonic.net Fri Aug 1 09:14:24 2025 From: halmurray at sonic.net (Hal Murray) Date: Fri, 01 Aug 2025 02:14:24 -0700 Subject: waf: compiler flags, uninitalized variable In-Reply-To: Message from Fred Wright via devel of "Wed, 30 Jul 2025 10:40:05 -0700." <6963e6f9-607d-3b30-4fde-b6e8bfdd8252@fwright.net> Message-ID: <20250801091424.7CFBF620170@107-137-68-211.lightspeed.sntcca.sbcglobal.net> devel at ntpsec.org said: > Usually, you won't get that type of warning unless you enable it. And > usually, you only get that type of warning in an optimized compile, since > the dataflow analysis needed to detect it is part of the optimization > code. I tried O3. That found a different maybe-uninitialized. I tried O6. Nothing new. -- These are my opinions. I hate spam. From fw at fwright.net Fri Aug 1 14:40:27 2025 From: fw at fwright.net (Fred Wright) Date: Fri, 1 Aug 2025 07:40:27 -0700 (PDT) Subject: waf: compiler flags, uninitalized variable In-Reply-To: <20250801091424.7CFBF620170@107-137-68-211.lightspeed.sntcca.sbcglobal.net> References: <20250801091424.7CFBF620170@107-137-68-211.lightspeed.sntcca.sbcglobal.net> Message-ID: On Fri, 1 Aug 2025, Hal Murray wrote: > devel at ntpsec.org said: >> Usually, you won't get that type of warning unless you enable it. And >> usually, you only get that type of warning in an optimized compile, since >> the dataflow analysis needed to detect it is part of the optimization >> code. > > I tried O3. That found a different maybe-uninitialized. > > I tried O6. Nothing new. The other thing I forgot to mention is that sometimes the control-flow analysis isn't as good in older compilers, leading to complaints about something being used uninitialized in a case where the code couldn't actually be reached in the unininitialized case. Unless there's a good reason to avoid it, usually the best fix is just to add an initializer to the declaration, even if it's not logically necessary. Fred Wright From halmurray at sonic.net Fri Aug 1 18:54:32 2025 From: halmurray at sonic.net (Hal Murray) Date: Fri, 01 Aug 2025 11:54:32 -0700 Subject: waf: compiler flags, uninitalized variable In-Reply-To: Message from Fred Wright via devel of "Fri, 01 Aug 2025 07:40:27 -0700." Message-ID: <20250801185432.18146620170@107-137-68-211.lightspeed.sntcca.sbcglobal.net> > The other thing I forgot to mention is that sometimes the control-flow > analysis isn't as good in older compilers, leading to complaints about > something being used uninitialized in a case where the code couldn't > actually be reached in the unininitialized case. Unless there's a good > reason to avoid it, usually the best fix is just to add an initializer to > the declaration, even if it's not logically necessary. I usually add a "keep compiler happy" comment to that sort of code. If I see that sort of code without a comment, I looking for it. The example that started this thread was really simple. -- These are my opinions. I hate spam. From halmurray at sonic.net Fri Aug 1 19:03:09 2025 From: halmurray at sonic.net (Hal Murray) Date: Fri, 01 Aug 2025 12:03:09 -0700 Subject: waf: compiler flags, uninitalized variable In-Reply-To: Message from Hal Murray of "Fri, 01 Aug 2025 11:54:32 -0700." <20250801185432.18146620170@107-137-68-211.lightspeed.sntcca.sbcglobal.net> Message-ID: <20250801190309.95F32620170@107-137-68-211.lightspeed.sntcca.sbcglobal.net> > If I see that sort of code without a comment, I looking for it. Looks like I fatfingered something. That should have been: If I see that sort of code without a comment, I get suspicious wondering if there might be something tricky going on and waste time looking for it. -- These are my opinions. I hate spam. From halmurray at sonic.net Sat Aug 23 23:03:09 2025 From: halmurray at sonic.net (Hal Murray) Date: Sat, 23 Aug 2025 16:03:09 -0700 Subject: CI broken -- macos post install checks can't find Python NTP library Message-ID: <20250823230309.BFDD962003D@107-137-68-211.lightspeed.sntcca.sbcglobal.net> It looks like it needa a pth file, but I don't know what version of Python it is using. Is there a simple way to find out? -- These are my opinions. I hate spam. From halmurray at sonic.net Sat Aug 23 23:38:12 2025 From: halmurray at sonic.net (Hal Murray) Date: Sat, 23 Aug 2025 16:38:12 -0700 Subject: Anybody using the HPGOS driver? With Z3801A? Message-ID: <20250823233812.0ED7C62003D@107-137-68-211.lightspeed.sntcca.sbcglobal.net> My Z3801A got hit by a WNRO glitch last weekend. Time jumped back to 2006 Jan 01. If you are using a Z3801A that didn't jump back in time, what version are you running? There should be something like this HEWLETT-PACKARD,Z3801A,3542A04389,3543-A in your clockstats (from when the driver was last started). I just pushed a fix -- copied from the NMEA driver. That push included my collected fixes/tweaks to the driver. The main ones are: Dropping the scpi > from clockstats optional logging of some device internals It's been well tested on the Z3801A but I might have broken something on some other devices. -- These are my opinions. I hate spam. From jamesb192 at jamesb192.com Sat Aug 23 23:55:33 2025 From: jamesb192 at jamesb192.com (James Browning) Date: Sat, 23 Aug 2025 16:55:33 -0700 Subject: CI broken -- macos post install checks can't find Python NTP library In-Reply-To: <20250823230309.BFDD962003D@107-137-68-211.lightspeed.sntcca.sbcglobal.net> References: <20250823230309.BFDD962003D@107-137-68-211.lightspeed.sntcca.sbcglobal.net> Message-ID: <3982463.lGaqSPkdTl@bourbon2.jamesb192.com> On Saturday, August 23, 2025 4:03:09?PM Pacific Daylight Time Hal Murray via devel wrote: > It looks like it needa a pth file, but I don't know what version of Python > it is using. > > Is there a simple way to find out? Yes, according to lines 140-141 of some rando file[1] it is Python 3.12.7. I having last touched the CI files, am to blame. Lines 403-405 and 408 need to go, unless post DESTDIR install checks get gaped ``` Checking for program 'python' : /Users/gitlab/.asdf/installs/python/ 3.12.7/bin/python Checking for python version >= 2.7.0 : 3.12.7 ``` [1] https://gitlab.com/NTPsec/ntpsec/-/jobs/11116878714 From gem at rellim.com Tue Aug 26 00:34:51 2025 From: gem at rellim.com (Gary E. Miller) Date: Mon, 25 Aug 2025 17:34:51 -0700 Subject: CI broken -- macos post install checks can't find Python NTP library In-Reply-To: <20250823230309.BFDD962003D@107-137-68-211.lightspeed.sntcca.sbcglobal.net> References: <20250823230309.BFDD962003D@107-137-68-211.lightspeed.sntcca.sbcglobal.net> Message-ID: <20250825173451.0b501914@spidey.rellim.com> Yo Hal! On Sat, 23 Aug 2025 16:03:09 -0700 Hal Murray via devel wrote: > It looks like it needa a pth file, but I don't know what version of > Python it is using. ~ $ python -m site sys.path = [ '/root', '/usr/lib/python313.zip', '/usr/lib/python3.13', '/usr/lib/python3.13/lib-dynload', '/usr/lib/python3.13/site-packages', '/usr/local/lib/python3.13/site-packages', ] Put the .pth file in site-ackages. RGDS GARY --------------------------------------------------------------------------- Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703 gem at rellim.com Tel:+1 541 382 8588 Veritas liberabit vos. -- Quid est veritas? "If you can't measure it, you can't improve it." - Lord Kelvin -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 246 bytes Desc: OpenPGP digital signature URL: From jamesb192 at jamesb192.com Tue Aug 26 01:23:35 2025 From: jamesb192 at jamesb192.com (James Browning) Date: Mon, 25 Aug 2025 18:23:35 -0700 Subject: CI broken -- macos post install checks can't find Python NTP library In-Reply-To: <20250825173451.0b501914@spidey.rellim.com> Message-ID: <9b217063-1171-4298-bc09-f612311796a7@email.android.com> An HTML attachment was scrubbed... URL: From gem at rellim.com Tue Aug 26 01:36:18 2025 From: gem at rellim.com (Gary E. Miller) Date: Mon, 25 Aug 2025 18:36:18 -0700 Subject: CI broken -- macos post install checks can't find Python NTP library In-Reply-To: <9b217063-1171-4298-bc09-f612311796a7@email.android.com> References: <20250825173451.0b501914@spidey.rellim.com> <9b217063-1171-4298-bc09-f612311796a7@email.android.com> Message-ID: <20250825183618.505c5ee3@spidey.rellim.com> Yo James! On Mon, 25 Aug 2025 18:23:35 -0700 James Browning via devel wrote: > On Aug 25, 2025, 17:34, "Gary E. Miller via devel" > wrote: > > > On Sat, 23 Aug 2025 16:03:09 -0700 > > Hal Murray via devel wrote: > > > > > It looks like it needa a pth file, but I don't know what version > > > of Python it is using. > > > > ???? ~ $ python -m site > > ??? sys.path = [ > > ??????? '/root', > > ??????? '/usr/lib/python313.zip', > > ??????? '/usr/lib/python3.13', > > ??????? '/usr/lib/python3.13/lib-dynload', > > ??????? '/usr/lib/python3.13/site-packages', > > ??????? '/usr/local/lib/python3.13/site-packages', > > ??? ] > > > > Put the .pth file in site-ackages. > > > Did you check the actual image? Nope. I just responded to Hal's question. My solution works in all cases. RGDS GARY --------------------------------------------------------------------------- Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703 gem at rellim.com Tel:+1 541 382 8588 Veritas liberabit vos. -- Quid est veritas? "If you can't measure it, you can't improve it." - Lord Kelvin -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 246 bytes Desc: OpenPGP digital signature URL: From halmurray at sonic.net Tue Aug 26 03:48:55 2025 From: halmurray at sonic.net (Hal Murray) Date: Mon, 25 Aug 2025 20:48:55 -0700 Subject: Strange warning... Message-ID: <20250826034855.A5C426201AC@107-137-68-211.lightspeed.sntcca.sbcglobal.net> Anybody understand this one? That's running on a Pi 1, with -O3 cc (Raspbian 6.3.0-18+rpi1+deb9u1) 6.3.0 20170516 Raspbian GNU/Linux 9 (stretch) 9.13 No warning with -O1 ../../ntpd/ntp_util.c:566:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] refid_t refid = *(const uint32_t*)rbufp->pkt.refid; -- These are my opinions. I hate spam. From gem at rellim.com Tue Aug 26 04:01:06 2025 From: gem at rellim.com (Gary E. Miller) Date: Mon, 25 Aug 2025 21:01:06 -0700 Subject: Strange warning... In-Reply-To: <20250826034855.A5C426201AC@107-137-68-211.lightspeed.sntcca.sbcglobal.net> References: <20250826034855.A5C426201AC@107-137-68-211.lightspeed.sntcca.sbcglobal.net> Message-ID: <20250825210106.05fa2d20@spidey.rellim.com> Yo Hal! On Mon, 25 Aug 2025 20:48:55 -0700 Hal Murray via devel wrote: > Anybody understand this one? Yeah. Type Cassting is now considered suspect, if not totally bad. > That's running on a Pi 1, with -O3 > cc (Raspbian 6.3.0-18+rpi1+deb9u1) 6.3.0 20170516 > Raspbian GNU/Linux 9 (stretch) 9.13 > No warning with -O1 > > ../../ntpd/ntp_util.c:566:2: warning: dereferencing type-punned > pointer will break strict-aliasing rules [-Wstrict-aliasing] > > refid_t refid = *(const uint32_t*)rbufp->pkt.refid; include/recvbuff.h: struct parsed_pkt pkt; /* host-order copy of data from wire */ pkt is NOT a (const uint32_t *) RGDS GARY --------------------------------------------------------------------------- Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703 gem at rellim.com Tel:+1 541 382 8588 Veritas liberabit vos. -- Quid est veritas? "If you can't measure it, you can't improve it." - Lord Kelvin -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 246 bytes Desc: OpenPGP digital signature URL: From halmurray at sonic.net Tue Aug 26 04:02:07 2025 From: halmurray at sonic.net (Hal Murray) Date: Mon, 25 Aug 2025 21:02:07 -0700 Subject: CI broken -- macos post install checks can't find Python NTP library In-Reply-To: Message from "Gary E. Miller via devel" of "Mon, 25 Aug 2025 17:34:51 -0700." <20250825173451.0b501914@spidey.rellim.com> Message-ID: <20250826040207.47DD86201AC@107-137-68-211.lightspeed.sntcca.sbcglobal.net> Hal said: >> It looks like it needa a pth file, but I don't know what >> version of Python it is using. Gary said: > ~ $ python -m site You skipped over an area I'm not familiar with. How did you get to the right enviroment? (macos) -- These are my opinions. I hate spam. From halmurray at sonic.net Tue Aug 26 06:25:35 2025 From: halmurray at sonic.net (Hal Murray) Date: Mon, 25 Aug 2025 23:25:35 -0700 Subject: Strange warning... In-Reply-To: Message from "Gary E. Miller via devel" of "Mon, 25 Aug 2025 21:01:06 -0700." <20250825210106.05fa2d20@spidey.rellim.com> Message-ID: <20250826062535.ACB456201A4@107-137-68-211.lightspeed.sntcca.sbcglobal.net> > Yeah. Type Cassting is now considered suspect, if not totally bad. The error message is coming from an old system so your "now" isn;t a good fit. Do we write this off as a glitch in an old compiler? How would we fix the code? It doesn't happen at -O1. It does happen at -O3 Why are we using -O1? Should we make occasional runs at -O3, or others, to see if any compiler will find things we should fix? -- These are my opinions. I hate spam. From gem at rellim.com Wed Aug 27 01:43:17 2025 From: gem at rellim.com (Gary E. Miller) Date: Tue, 26 Aug 2025 18:43:17 -0700 Subject: Strange warning... In-Reply-To: <20250826062535.ACB456201A4@107-137-68-211.lightspeed.sntcca.sbcglobal.net> References: <20250825210106.05fa2d20@spidey.rellim.com> <20250826062535.ACB456201A4@107-137-68-211.lightspeed.sntcca.sbcglobal.net> Message-ID: <20250826184317.49e8ce2c@spidey.rellim.com> Yo Hal! On Mon, 25 Aug 2025 23:25:35 -0700 Hal Murray wrote: > > Yeah. Type Cassting is now considered suspect, if not totally bad. > > > > The error message is coming from an old system so your "now" isn;t a > good fit. For some definition of "now". > Do we write this off as a glitch in an old compiler? How would we > fix the code? Needs to be fixed. Just fix the cast. > It doesn't happen at -O1. It does happen at -O3 > Why are we using -O1? Beats me. > Should we make occasional runs at -O3, or others, to see if any > compiler will find things we should fix? Depends on the compiler. I try various things now and then to see what shakes out. RGDS GARY --------------------------------------------------------------------------- Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703 gem at rellim.com Tel:+1 541 382 8588 Veritas liberabit vos. -- Quid est veritas? "If you can't measure it, you can't improve it." - Lord Kelvin -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 246 bytes Desc: OpenPGP digital signature URL: