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

Alex Lorenz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 13 10:54:59 PST 2017


arphaman added inline comments.


================
Comment at: test/CodeGenCXX/ubsan-suppress-null-checks.cpp:8
+  int load_member() {
+    // CHECK: call void @__ubsan_handle_type_mismatch
+    // CHECK-NOT: call void @__ubsan_handle_type_mismatch
----------------
I think this kind of check would've passed even when this patch is not applied. I understand that you need the first check for the single 'this' check, but it should be rewritten to ensure that it couldn't be the check for the `return foo`. Maybe you could use a C label before return and then check that the 'this' check is performed before the label?


https://reviews.llvm.org/D29530





More information about the cfe-commits mailing list