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

Vedant Kumar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 8 09:25:17 PST 2017


vsk added a comment.

In https://reviews.llvm.org/D30423#695608, @filcab wrote:

> LGTM since my issue is only an issue on ObjC platforms and it seems those are the semantics it should have there.


Thanks for the review.

> P.S: If it documented that the only possible values for BOOL are YES and NO (assuming they are 1 and 0)?

I think this more or less counts: https://developer.apple.com/reference/objectivec/objective_c_runtime/boolean_values

> If so, I wonder if it's planned to document that you can't store a YES on a BOOL bitfield with a width of 1, since it looks like a weird case.

I will ask around. There is a warning about signedness issues here: https://developer.apple.com/reference/objectivec/bool?language=objc


https://reviews.llvm.org/D30423





More information about the cfe-commits mailing list