Files
clang-p2996/clang/test/CodeGenCXX
Vedant Kumar 129edab125 Retry: [ubsan] Detect UB loads from bitfields
It's possible to load out-of-range values from bitfields backed by a
boolean or an enum. Check for UB loads from bitfields.

This is the motivating example:

  struct S {
    BOOL b : 1; // Signed ObjC BOOL.
  };

  S s;
  s.b = 1; // This is actually stored as -1.
  if (s.b == 1) // Evaluates to false, -1 != 1.
    ...

Changes since the original commit:

- Single-bit bools are a special case (see CGF::EmitFromMemory), and we
  can't avoid dealing with them when loading from a bitfield. Don't try to
  insert a check in this case.

Differential Revision: https://reviews.llvm.org/D30423

llvm-svn: 297389
2017-03-09 16:06:27 +00:00
..
2016-02-02 12:39:08 +00:00
2016-11-16 19:31:44 +00:00
2016-11-09 23:10:44 +00:00
2016-12-01 20:16:56 +00:00
2016-07-12 16:56:33 +00:00
2016-02-20 09:23:41 +00:00
2016-07-29 19:43:28 +00:00
2016-03-22 17:10:07 +00:00
2016-06-21 03:43:11 +00:00
2016-06-14 21:02:05 +00:00