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
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
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
_
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
=
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
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
__
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
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
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
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
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
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
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:
13 matches
Mail list logo