[PATCH] D36112: [ubsan] Have -fsanitize=vptr emit a null check if -fsanitize=null isn't available

Vedant Kumar via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 1 13:42:34 PDT 2017


Alex is in a different time zone, so he may not get to this today.

Do you have the time to give a review?

> On Aug 1, 2017, at 12:38 PM, Nico Weber <thakis at chromium.org> wrote:
> 
> It'd be good if this could go in today. ubsanvptr has been broken for us for a while now.
> 
> On Mon, Jul 31, 2017 at 4:43 PM, Vedant Kumar via Phabricator via cfe-commits <cfe-commits at lists.llvm.org <mailto:cfe-commits at lists.llvm.org>> wrote:
> vsk created this revision.
> 
> In r309007, I made -fsanitize=null a hard prerequisite for -fsanitize=vptr. I did not see the need for the two checks to have separate null checking logic for the same pointer. I expected the two checks to either always be enabled together, or to be mutually compatible.
> 
> In the mailing list discussion re: r309007 it became clear that that isn't the case. If a codebase is -fsanitize=vptr clean but not -fsanitize=null clean, it's useful to have -fsanitize=vptr emit its own null check. That's what this patch does: with it, -fsanitize=vptr can be used without -fsanitize=null.
> 
> 
> https://reviews.llvm.org/D36112 <https://reviews.llvm.org/D36112>
> 
> Files:
>   docs/ReleaseNotes.rst
>   docs/UndefinedBehaviorSanitizer.rst
>   include/clang/Basic/DiagnosticDriverKinds.td
>   lib/CodeGen/CGExpr.cpp
>   lib/Driver/SanitizerArgs.cpp
>   test/CodeGenCXX/catch-undef-behavior.cpp
>   test/CodeGenCXX/ubsan-type-checks.cpp
>   test/Driver/fsanitize.c
>   test/Driver/rtti-options.cpp
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org <mailto:cfe-commits at lists.llvm.org>
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits <http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits>
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170801/354b80c3/attachment.html>


More information about the cfe-commits mailing list