[PATCH] D22227: [ubsan] Disable bounds-check for flexible array ivars
Vedant Kumar via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 4 10:28:24 PDT 2016
vsk added a comment.
The ivar list is set by all_declared_ivar_begin(), which accounts for ivars introduced by an implementation. Thanks for raising the point.
Consider this test:
@interface HasFlexibleArray {
@public char chars[0];
}
@implementation HasFlexibleArray {
@public char chars2[0];
}
I found that the current patch **will** sanitize accesses to 'chars', but **will not** sanitize accesses to 'chars2'. I think that's the desired behavior -- wdyt?
https://reviews.llvm.org/D22227
More information about the cfe-commits
mailing list