]> granicus.if.org Git - clang/commit
Implement Control Flow Integrity for virtual calls.
authorPeter Collingbourne <peter@pcc.me.uk>
Fri, 20 Feb 2015 20:30:56 +0000 (20:30 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Fri, 20 Feb 2015 20:30:56 +0000 (20:30 +0000)
commitf9d64b33ebc403c7cf746b848352b1606e2beb0b
tree04cd318bd0a0686bc3ed06812361404c0b74b152
parent01ec5f25641bc4a985138e068cf4b739531cc298
Implement Control Flow Integrity for virtual calls.

This patch introduces the -fsanitize=cfi-vptr flag, which enables a control
flow integrity scheme that checks that virtual calls take place using a vptr of
the correct dynamic type. More details in the new docs/ControlFlowIntegrity.rst
file.

It also introduces the -fsanitize=cfi flag, which is currently a synonym for
-fsanitize=cfi-vptr, but will eventually cover all CFI checks implemented
in Clang.

Differential Revision: http://reviews.llvm.org/D7424

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230055 91177308-0d34-0410-b5e6-96231b3b80d8
20 files changed:
docs/ControlFlowIntegrity.rst [new file with mode: 0644]
docs/ControlFlowIntegrityDesign.rst [new file with mode: 0644]
docs/UsersManual.rst
docs/index.rst
include/clang/AST/Mangle.h
include/clang/Basic/Sanitizers.def
include/clang/Driver/Driver.h
include/clang/Driver/SanitizerArgs.h
lib/AST/ItaniumMangle.cpp
lib/AST/MicrosoftMangle.cpp
lib/CodeGen/CGClass.cpp
lib/CodeGen/CGVTables.cpp
lib/CodeGen/CodeGenFunction.h
lib/CodeGen/CodeGenModule.h
lib/CodeGen/ItaniumCXXABI.cpp
lib/Driver/Driver.cpp
lib/Driver/SanitizerArgs.cpp
lib/Driver/Tools.cpp
test/CodeGenCXX/cfi-vptr.cpp [new file with mode: 0644]
test/Driver/fsanitize.c