This revision was automatically updated to reflect the committed changes.
Closed by commit rL284636: [ubsan] Use the object pointer's type info for
devirtualized calls (authored by vedantk).
Changed prior to commit:
https://reviews.llvm.org/D25448?vs=75168&id=75211#toc
Repository:
rL LLVM
h
rjmccall accepted this revision.
rjmccall added a comment.
This revision is now accepted and ready to land.
Looks great, thanks.
https://reviews.llvm.org/D25448
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/ma
vsk updated this revision to Diff 75168.
vsk added a comment.
Thanks for the feedback!
Patch update:
- Pass in the right CalleeDecl to EmitCXXMemberOrOperatorCall. This lets us
drop the unnecessary 'DevirtualizedClassTy' optional parameter.
- Extend the test case with John's example (devirt for
rjmccall added inline comments.
Comment at: lib/CodeGen/CGExprCXX.cpp:31
+CallArgList &Args, CallArgList *RtlArgs,
+llvm::Optional DevirtualizedClassTy) {
assert(CE == nullptr || isa(CE) ||
Shouldn't MD just be the devirtualized method? That should av
rjmccall added a comment.
In https://reviews.llvm.org/D25448#572245, @vsk wrote:
> Patch update: Pass along the type info of the derived class to the ubsan
> runtime when we devirtualize a method call. This squashes the FP. I tested
> this with 'check-ubsan' in addition to adding a lit test.
>
vsk updated this revision to Diff 74943.
vsk added a comment.
- Remove some default arguments left over from an older revision of this patch.
- Simplify the test.
https://reviews.llvm.org/D25448
Files:
lib/CodeGen/CGExprCXX.cpp
lib/CodeGen/CodeGenFunction.h
test/CodeGenCXX/ubsan-devirtual
vsk retitled this revision from "[ubsan] Disable -fsanitize=vptr checks for
devirtualized calls" to "[ubsan] Use the object pointer's type info for
devirtualized calls".
vsk updated the summary for this revision.
vsk added a subscriber: rsmith.
vsk updated this revision to Diff 74916.
vsk added a