[PATCH] D30283: [ubsan] Reduce alignment checking of C++ object pointers

Vedant Kumar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 14 15:12:59 PDT 2017


vsk added a comment.

Thanks for the review!



================
Comment at: test/CodeGenCXX/ubsan-suppress-checks.cpp:25
+    // LAMBDA: and i64 %[[THISINT2]], 3, !nosanitize
+    // LAMBDA: call void @__ubsan_handle_type_mismatch
+
----------------
efriedma wrote:
> LAMBDA-NOT: call void @__ubsan_handle_type_mismatch ?
I'll tighten up this test. This method contains two calls to __ubsan_handle_type_mismatch. The first is due to a null+alignment check for "this" at the start of "do_nothing_with_lambda". The second occurs because we have the same checks for the anonymous object backing "f". Before this patch, the first check on "this" did not perform an alignment check. The second check has always been present.


https://reviews.llvm.org/D30283





More information about the cfe-commits mailing list