[PATCH] D19668: [ubsan] Minimize size of data for type_mismatch

Filipe Cabecinhas via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 28 09:45:18 PDT 2016


filcab added a subscriber: filcab.
filcab added a comment.

We can think about adding a piece of data (we have 6 bytes which will
end up being used for padding) that tells us we have a "V2" struct
layout.

If we feel strongly about being able to use older objects, then we can
add an unsigned char after TypeCheckKind, for example. Since
TypeCheckKind can be 0, we have no reliable way to figure out if we're
looking at a new layout (we could see only one bit set in both chars.
This could be because we were looking at an old-style alignment
(uptr), or a new style (char) plus TCK set to 0).

Kostya: Any thoughts?

Thank you,

  Filipe


http://reviews.llvm.org/D19668





More information about the llvm-commits mailing list