[PATCH] D119296: KCFI sanitizer
Yuanfang Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 9 18:13:10 PDT 2022
ychen added inline comments.
================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:2257
+
+ F->setPrefixData(CreateKCFITypeId(FD->getType()));
+ F->addFnAttr("kcfi-target");
----------------
FYI: using prefix data may not work for the C++ coroutine. (https://github.com/llvm/llvm-project/issues/49689) because corosplit pass may clone coro functions and change its function type. But prefix data is opaque, so there is no way to detect this, and then drop the prefix data in the corosplit pass.
If this is a concern for now or for the near future, it might be better to use alternative approaches like D115844.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119296/new/
https://reviews.llvm.org/D119296
More information about the llvm-commits
mailing list