[PATCH] D30423: [ubsan] Detect UB loads from bitfields

Vedant Kumar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 27 12:00:50 PST 2017


vsk created this revision.

We frequently run into user bugs caused by UB loads of out-of-range values from enum / BOOL bitfields. Teach UBSan to diagnose the issue.


https://reviews.llvm.org/D30423

Files:
  lib/CodeGen/CGAtomic.cpp
  lib/CodeGen/CGExpr.cpp
  lib/CodeGen/CodeGenFunction.h
  test/CodeGenCXX/ubsan-bitfields.cpp
  test/CodeGenObjC/ubsan-bool.m

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30423.89914.patch
Type: text/x-patch
Size: 3568 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170227/c0ebe5c1/attachment.bin>


More information about the cfe-commits mailing list