[PATCH] D22227: [ubsan] Disable bounds-check for flexible array ivars

2016-10-04 Thread Vedant Kumar via cfe-commits
vsk added a comment. Thanks for the review! I looked at the IR and confirmed that the ivars are laid out in the order they're defined, that the indirect ivar offsets make sense, and that the runtime ivar offsets match up with what we expect. E.g; @"OBJC_IVAR_$_FlexibleArray1.chars" = global

[PATCH] D22227: [ubsan] Disable bounds-check for flexible array ivars

2016-10-04 Thread Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL283249: [ubsan] Disable bounds-check for flexible array ivars (authored by vedantk). Changed prior to commit: https://reviews.llvm.org/D7?vs=73508&id=73547#toc Repository: rL LLVM https://review

[PATCH] D22227: [ubsan] Disable bounds-check for flexible array ivars

2016-10-04 Thread Adrian Prantl via cfe-commits
aprantl accepted this revision. aprantl added a comment. This revision is now accepted and ready to land. Can you double-check that the memory layout is actually what we think it is by inspecting the generated IR? Otherwise this LGTM. https://reviews.llvm.org/D7 _

[PATCH] D22227: [ubsan] Disable bounds-check for flexible array ivars

2016-10-04 Thread Vedant Kumar via cfe-commits
vsk updated this revision to Diff 73508. vsk added a comment. Add tests for implementations which introduce ivars. https://reviews.llvm.org/D7 Files: lib/CodeGen/CGExpr.cpp test/CodeGenObjC/ubsan-array-bounds.m Index: test/CodeGenObjC/ubsan-array-bounds.m =

[PATCH] D22227: [ubsan] Disable bounds-check for flexible array ivars

2016-10-04 Thread Vedant Kumar via cfe-commits
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 ch

[PATCH] D22227: [ubsan] Disable bounds-check for flexible array ivars

2016-10-03 Thread Adrian Prantl via cfe-commits
aprantl added a comment. Not knowing the specifics of the ObjC class layout: Does this work correctly with private ivars (i.e.: Does this need an extra check that there are no extra ivars in a later @implementation)? https://reviews.llvm.org/D7 __

Re: [PATCH] D22227: [ubsan] Disable bounds-check for flexible array ivars

2016-09-07 Thread Vedant Kumar via cfe-commits
vsk added a comment. Ping? https://reviews.llvm.org/D7 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22227: [ubsan] Disable bounds-check for flexible array ivars

2016-08-25 Thread Vedant Kumar via cfe-commits
vsk added a comment. Ping. https://reviews.llvm.org/D7 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22227: [ubsan] Disable bounds-check for flexible array ivars

2016-08-09 Thread Vedant Kumar via cfe-commits
vsk added a comment. Ping. https://reviews.llvm.org/D7 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22227: [ubsan] Disable bounds-check for flexible array ivars

2016-08-01 Thread Vedant Kumar via cfe-commits
vsk added a comment. Ping. https://reviews.llvm.org/D7 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22227: [ubsan] Disable bounds-check for flexible array ivars

2016-07-25 Thread Vedant Kumar via cfe-commits
vsk added a comment. Ping. https://reviews.llvm.org/D7 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22227: [ubsan] Disable bounds-check for flexible array ivars

2016-07-18 Thread Vedant Kumar via cfe-commits
vsk added a comment. Ping. https://reviews.llvm.org/D7 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D22227: [ubsan] Disable bounds-check for flexible array ivars

2016-07-11 Thread Vedant Kumar via cfe-commits
vsk created this revision. vsk added reviewers: rsmith, samsonov. vsk added a subscriber: cfe-commits. Ubsan does not emit bounds checks for flexible array members, e.g: