This revision was automatically updated to reflect the committed changes.
Closed by commit rL307955: [ubsan] Teach the pointer overflow check that "p -
<= p" (PR33430) (authored by vedantk).
Changed prior to commit:
https://reviews.llvm.org/D34121?vs=103606=106524#toc
Repository:
rL LLVM
vsk added a comment.
In https://reviews.llvm.org/D34121#808486, @dtzWill wrote:
> In https://reviews.llvm.org/D34121#806978, @vsk wrote:
>
> > @dtzWill do you have any further comments on this one?
> >
> > I'd like to get another 'lgtm' before committing, and it'd be nice to get
> > this in
dtzWill added a comment.
In https://reviews.llvm.org/D34121#806978, @vsk wrote:
> @dtzWill do you have any further comments on this one?
>
> I'd like to get another 'lgtm' before committing, and it'd be nice to get
> this in before llvm 5.0 branches (7/19).
>
> FWIW we've been living on this
vsk added a comment.
@dtzWill do you have any further comments on this one?
I'd like to get another 'lgtm' before committing, and it'd be nice to get this
in before llvm 5.0 branches (7/19).
FWIW we've been living on this for a few weeks internally without any issues:
vsk updated this revision to Diff 103606.
vsk added a comment.
Fix a typo introduced in emitArraySubscriptGEP while refactoring
/*isSubtraction=false*/ to CodeGenFunction::NotSubtraction, and add CHECK lines
which catch the issue.
https://reviews.llvm.org/D34121
Files:
vsk updated this revision to Diff 102603.
vsk marked an inline comment as done.
vsk added a comment.
Address Adrian's comment about using an enum to simplify some calls.
https://reviews.llvm.org/D34121
Files:
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CGExprScalar.cpp
aprantl added inline comments.
Comment at: lib/CodeGen/CGExpr.cpp:3010
+return CGF.EmitCheckedInBoundsGEP(ptr, indices, signedIndices,
+ /*IsSubtraction=*/false, loc, name);
} else {
Might want to define an
`enum {
vsk added a comment.
In https://reviews.llvm.org/D34121#779347, @dtzWill wrote:
> Don't mean to block this, but just FYI I won't be able to look into this
> carefully until later this week (sorry!).
>
> Kicked off a rebuild using these patches just now, though! O:)
No problem, thanks for
dtzWill added a comment.
Don't mean to block this, but just FYI I won't be able to look into this
carefully until later this week (sorry!).
Kicked off a rebuild using these patches just now, though! O:)
https://reviews.llvm.org/D34121
___
vsk updated this revision to Diff 102261.
vsk marked an inline comment as done.
vsk edited the summary of this revision.
vsk added a comment.
Thanks for the review! I'll wait for another 'lgtm'.
https://reviews.llvm.org/D34121
Files:
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CGExprScalar.cpp
efriedma added a comment.
Looks okay, but I haven't been reviewing this series of patches closely, so I
could be missing something.
Comment at: lib/CodeGen/CGExprScalar.cpp:3974
ValidGEP = Builder.CreateAnd(PosOrZeroValid, NoOffsetOverflow);
+ } else if (!SignedIndices
vsk created this revision.
The pointer overflow check gives false negatives when dealing with
expressions in which an unsigned value is subtracted from a pointer.
This is summarized in PR33430 [1]: ubsan permits the result of the
submission to be greater than "p", but it should not.
To fix the
12 matches
Mail list logo