This uses the same class metadata currently used for virtual call and
cast checks.
The new flag is -fsanitize=cfi-nvcall. For consistency, the -fsanitize=cfi-vptr
flag has been renamed -fsanitize=cfi-vcall.
Paths
| Differential D8756
Implement CFI type checks for non-virtual calls. ClosedPublic Authored by pcc on Mar 31 2015, 7:09 PM.
Details Summary This uses the same class metadata currently used for virtual call and The new flag is -fsanitize=cfi-nvcall. For consistency, the -fsanitize=cfi-vptr
Diff Detail Event Timelinepcc updated this object.
pcc edited edge metadata. Comment Actions
This revision is now accepted and ready to land.Apr 1 2015, 5:17 PM Closed by commit rL233874: Implement CFI type checks for non-virtual calls. (authored by pcc). · Explain WhyApr 1 2015, 5:26 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 23024 docs/ControlFlowIntegrity.rst
docs/UsersManual.rst
include/clang/Basic/Sanitizers.def
lib/CodeGen/CGClass.cpp
lib/CodeGen/CGExprCXX.cpp
lib/CodeGen/CGVTables.cpp
lib/CodeGen/ItaniumCXXABI.cpp
lib/Driver/SanitizerArgs.cpp
test/CodeGenCXX/cfi-nvcall.cpp
test/CodeGenCXX/cfi-vcall.cpp
test/Driver/fsanitize.c
|
Could you add a comment that explains the difference between these two calls to g(), and why the strict check looks for C specifically here whereas the non-strict one accepts A? If c is actually an A then the code is still wrong, but if it's a B then the programmer is technically wrong but a lot of code does this like LLVM itself (I think you had an explanation with examples in an email?).