Closed dmitryash closed 1 year ago
In most cases using strict aliasing is undefined behaviour. Obviously cdb is supposed to be an array of bytes and accessing any CDB field using strict aliasing leads to misaligned read which may cause even a crash.
See here
@dmitryash
Could you add the signed-of-by: and add some comments in commit ? And what the UB means here ? Thanks!
signed-of-by:
UB
@lxbsz Hi, I added the requested information, review please.
LGTM. Thanks!
In most cases using strict aliasing is undefined behaviour. Obviously cdb is supposed to be an array of bytes and accessing any CDB field using strict aliasing leads to misaligned read which may cause even a crash.
See here