Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/kern



On Wed, Nov 06, 2019 at 11:17:23PM +0100, Kamil Rytarowski wrote:
> Technically, I think that this is a real UB.
> 
> 6.3.2.3/7
> A pointer to an object type may be converted to a pointer to a
> different object type. If the resulting pointer is not correctly
> aligned for the referenced type, the behavior is undefined.

I don't think this applies here, as the usage was invoking memcmp(),
so explicitly being fine with unaligned data.

This clearly was a false positive and the code is now a lot more
unreadable.

Martin


Home | Main Index | Thread Index | Old Index