[PATCH] D36810: Minimal runtime for UBSan.
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 17 16:00:48 PDT 2017
eugenis added inline comments.
================
Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:548
+ } else {
+ SharedRuntimes.push_back("ubsan_standalone");
+ if (SanArgs.linkCXXRuntimes())
----------------
pcc wrote:
> What would happen if I compile with asan+ubsan+minimal runtime? Does that combination make sense?
Not right now. The driver would not accept asan + minimal-runtime - see CompatibleWithMinimalRuntime. We may come up with a hardened runtime library for ASan in the future; I expect it to include minimal-ubsan runtime and then needsAsanRt() would be true and needsUbsanRt() would be false.
This is all hypothetical, I don't plan to work on "hardened asan" in the near future.
================
Comment at: compiler-rt/lib/ubsan_minimal/ubsan_minimal_handlers.cc:24
+#define HANDLER(name, msg) \
+ INTERFACE void __ubsan_handle_##name##_minimal() { \
+ message("ubsan: " msg "\n"); \
----------------
pcc wrote:
> There's a function type mismatch here I believe. If the idea is to reduce binary size, I'd imagine that we'd want to avoid passing the source location on the clang side.
Good point. Completely forgot about that :)
https://reviews.llvm.org/D36810
More information about the llvm-commits
mailing list