On 07.11.2019 07:25, Martin Husemann wrote: > 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 > Please see my newer mail with rationale and another one with a confirmation that this was real UB.
Attachment:
signature.asc
Description: OpenPGP digital signature