[libcxx-commits] [PATCH] D95827: Avoid cast<T*> before T is constructed to pacify CFI checks

Reid Kleckner via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Feb 2 12:43:37 PST 2021


rnk added a comment.

In D95827#2537382 <https://reviews.llvm.org/D95827#2537382>, @ldionne wrote:

> I think option (1) would be the best. Is it sufficient to add `-fsanitize=cfi -flto` when compiling a test file to reproduce the issue? If so, I think we could simply add a new CFI sanitizer configuration to Lit that does that, and add a corresponding job to run the whole test suite with CFI enabled. We can tackle that as a separate effort.

Makes sense to me. I think CFI also requires `-fvisibility=hidden` to make its vtable checks work. `-fno-sanitize-trap` makes CFI violations produce diagnostics instead of simply trapping, so you would want to include it in a test config.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95827/new/

https://reviews.llvm.org/D95827



More information about the libcxx-commits mailing list