[PATCH] D21695: [clang] Version support for UBSan handlers

Vedant Kumar via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 9 19:27:40 PDT 2016

vsk added a subscriber: vsk.
vsk added a comment.

After reading through the discussion in https://reviews.llvm.org/D19668, I don't think I understood the pros/cons of using a single ABI check (like asan does) versus adding version numbers to each handler routine. With the latter approach, wouldn't users only be able to link old object files with new runtimes if we never delete old checks? If that's the case, and assuming that we'd like to delete old checks, a single version symbol check would accomplish the same thing.

Comment at: lib/CodeGen/CGExpr.cpp:2473
@@ +2472,3 @@
+      ("__ubsan_handle_" + CheckName +
+       (CheckInfo.Version ? "_v" + std::to_string(CheckInfo.Version) : "") +
+       (NeedsAbortSuffix ? "_abort" : ""))
Wdyt of dropping the "_vN" component if the version is 0? That's one less compiler-rt change that we'd need.


More information about the cfe-commits mailing list