[PATCH] D29530: [ubsan] Reduce null checking of C++ object pointers (PR27581)

Vedant Kumar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 10 19:08:32 PST 2017


vsk updated this revision to Diff 88075.
vsk edited the summary of this revision.
vsk added a reviewer: arphaman.
vsk added a comment.

- Check 'this' once per method. This supports the partial sanitization use-case.
- Flesh out the predicate for avoiding null checks on object pointers. I couldn't use isImplicitCXXThis like I'd wanted, because we'd like to catch explicit this exprs as well.


https://reviews.llvm.org/D29530

Files:
  lib/CodeGen/CGExpr.cpp
  lib/CodeGen/CGExprCXX.cpp
  lib/CodeGen/CodeGenFunction.cpp
  lib/CodeGen/CodeGenFunction.h
  test/CodeGen/catch-undef-behavior.c
  test/CodeGen/sanitize-recover.c
  test/CodeGenCXX/ubsan-suppress-null-checks.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29530.88075.patch
Type: text/x-patch
Size: 14235 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170211/19c796b6/attachment-0001.bin>


More information about the cfe-commits mailing list