On 06.06.2019 05:07, Mouse wrote:
>> Unfortunately, if "undefined behavior" (UB) is invoked, you simply
>> cannot claim to understand what is happening, because C11-compliant
>> compilers have a lot of leeway in what code they generate when
>> behavior is undefined.
>
> Compilers that do
> Unfortunately, if "undefined behavior" (UB) is invoked, you simply
> cannot claim to understand what is happening, because C11-compliant
> compilers have a lot of leeway in what code they generate when
> behavior is undefined.
Compilers that do unexpected things under such circumstances are
On Thu, Jun 06, 2019 at 04:42:50AM +0700, Robert Elz wrote:
> Further, I'd never do it without a thorough review of the code,
> if you looked, you'd also see
>
> freq = (ntv->freq * 1000LL) >> 16;
>
> and
>
> ntv->ppsfreq = L_GINT((pps_freq / 1000LL) << 16);
>
> (and
On 05.06.2019 23:42, Robert Elz wrote:
> Date:Wed, 5 Jun 2019 22:25:39 +0200
> From:Kamil Rytarowski
> Message-ID: <05d25ffa-588b-464f-56c9-099fea3f3...@gmx.com>
>
> | Does this patch look good?
>
> Personally, I would hesitate to change any of the NTP related
>
Date:Wed, 5 Jun 2019 22:25:39 +0200
From:Kamil Rytarowski
Message-ID: <05d25ffa-588b-464f-56c9-099fea3f3...@gmx.com>
| Does this patch look good?
Personally, I would hesitate to change any of the NTP related
code without an extremely good reason, and without a lot
Does this patch look good?
http://netbsd.org/~kamil/patch-00121-kern_ntptime.c.txt
It fixes the following reports:
[ 49.1001191] UBSan: Undefined Behavior in
../../../../kern/kern_ntptime.c:381:14, left shift of negative value
-43172954112
[ 49.1001191] UBSan: Undefined Behavior in