diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2015-09-10 02:18:02 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2015-09-10 02:18:02 +0000 |
commit | 35c115c610e169f484148fe1689d0e9f69012411 (patch) | |
tree | 773b8974a332bacf796216a393dae614c5f7f2a4 /lib/ubsan/ubsan_handlers.h | |
parent | 26dfddc93583e5c4cb9abfff3675d89aa193fb1f (diff) | |
download | compiler-rt-35c115c610e169f484148fe1689d0e9f69012411.tar.gz |
CFI: Add diagnostic handler and tests for indirect call checker.
Differential Revision: http://reviews.llvm.org/D11858
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@247239 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ubsan/ubsan_handlers.h')
-rw-r--r-- | lib/ubsan/ubsan_handlers.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/ubsan/ubsan_handlers.h b/lib/ubsan/ubsan_handlers.h index 25093d432..6f309cf9a 100644 --- a/lib/ubsan/ubsan_handlers.h +++ b/lib/ubsan/ubsan_handlers.h @@ -148,6 +148,14 @@ struct NonNullArgData { /// \brief Handle passing null pointer to function with nonnull attribute. RECOVERABLE(nonnull_arg, NonNullArgData *Data) +struct CFIBadIcallData { + SourceLocation Loc; + const TypeDescriptor &Type; +}; + +/// \brief Handle control flow integrity failure for indirect function calls. +RECOVERABLE(cfi_bad_icall, CFIBadIcallData *Data, ValueHandle Function) + } #endif // UBSAN_HANDLERS_H |