diff options
author | Martin Liska <mliska@suse.cz> | 2020-11-13 17:03:23 +0100 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2020-11-13 17:28:49 +0100 |
commit | 98f792ff538109c71d85ab2a61461cd090f3b9f3 (patch) | |
tree | 99bf74a06438f0328ade0591a0df6e6cf0572ddb /libsanitizer/ubsan | |
parent | a514934a0565255276adaa4fbd4aa35579ec33c6 (diff) | |
download | gcc-98f792ff538109c71d85ab2a61461cd090f3b9f3.zip gcc-98f792ff538109c71d85ab2a61461cd090f3b9f3.tar.gz gcc-98f792ff538109c71d85ab2a61461cd090f3b9f3.tar.bz2 |
libsanitizer: merge from master.
Diffstat (limited to 'libsanitizer/ubsan')
-rw-r--r-- | libsanitizer/ubsan/ubsan_flags.cpp | 1 | ||||
-rw-r--r-- | libsanitizer/ubsan/ubsan_handlers.cpp | 15 | ||||
-rw-r--r-- | libsanitizer/ubsan/ubsan_handlers.h | 8 | ||||
-rw-r--r-- | libsanitizer/ubsan/ubsan_platform.h | 4 | ||||
-rw-r--r-- | libsanitizer/ubsan/ubsan_type_hash_itanium.cpp | 2 | ||||
-rw-r--r-- | libsanitizer/ubsan/ubsan_type_hash_win.cpp | 2 |
6 files changed, 3 insertions, 29 deletions
diff --git a/libsanitizer/ubsan/ubsan_flags.cpp b/libsanitizer/ubsan/ubsan_flags.cpp index 9a66bd3..25cefd4 100644 --- a/libsanitizer/ubsan/ubsan_flags.cpp +++ b/libsanitizer/ubsan/ubsan_flags.cpp @@ -50,7 +50,6 @@ void InitializeFlags() { { CommonFlags cf; cf.CopyFrom(*common_flags()); - cf.print_summary = false; cf.external_symbolizer_path = GetFlag("UBSAN_SYMBOLIZER_PATH"); OverrideCommonFlags(cf); } diff --git a/libsanitizer/ubsan/ubsan_handlers.cpp b/libsanitizer/ubsan/ubsan_handlers.cpp index 2184625..e201e6b 100644 --- a/libsanitizer/ubsan/ubsan_handlers.cpp +++ b/libsanitizer/ubsan/ubsan_handlers.cpp @@ -894,21 +894,6 @@ void __ubsan_handle_cfi_bad_type(CFICheckFailData *Data, ValueHandle Vtable, } // namespace __ubsan -void __ubsan::__ubsan_handle_cfi_bad_icall(CFIBadIcallData *CallData, - ValueHandle Function) { - GET_REPORT_OPTIONS(false); - CFICheckFailData Data = {CFITCK_ICall, CallData->Loc, CallData->Type}; - handleCFIBadIcall(&Data, Function, Opts); -} - -void __ubsan::__ubsan_handle_cfi_bad_icall_abort(CFIBadIcallData *CallData, - ValueHandle Function) { - GET_REPORT_OPTIONS(true); - CFICheckFailData Data = {CFITCK_ICall, CallData->Loc, CallData->Type}; - handleCFIBadIcall(&Data, Function, Opts); - Die(); -} - void __ubsan::__ubsan_handle_cfi_check_fail(CFICheckFailData *Data, ValueHandle Value, uptr ValidVtable) { diff --git a/libsanitizer/ubsan/ubsan_handlers.h b/libsanitizer/ubsan/ubsan_handlers.h index 9f41235..219fb15 100644 --- a/libsanitizer/ubsan/ubsan_handlers.h +++ b/libsanitizer/ubsan/ubsan_handlers.h @@ -215,20 +215,12 @@ enum CFITypeCheckKind : unsigned char { CFITCK_VMFCall, }; -struct CFIBadIcallData { - SourceLocation Loc; - const TypeDescriptor &Type; -}; - struct CFICheckFailData { CFITypeCheckKind CheckKind; SourceLocation Loc; const TypeDescriptor &Type; }; -/// \brief Handle control flow integrity failure for indirect function calls. -RECOVERABLE(cfi_bad_icall, CFIBadIcallData *Data, ValueHandle Function) - /// \brief Handle control flow integrity failures. RECOVERABLE(cfi_check_fail, CFICheckFailData *Data, ValueHandle Function, uptr VtableIsValid) diff --git a/libsanitizer/ubsan/ubsan_platform.h b/libsanitizer/ubsan/ubsan_platform.h index 58aabbe..32d949d 100644 --- a/libsanitizer/ubsan/ubsan_platform.h +++ b/libsanitizer/ubsan/ubsan_platform.h @@ -12,16 +12,14 @@ #ifndef UBSAN_PLATFORM_H #define UBSAN_PLATFORM_H -#ifndef CAN_SANITIZE_UB // Other platforms should be easy to add, and probably work as-is. #if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || \ - defined(__NetBSD__) || defined(__OpenBSD__) || \ + defined(__NetBSD__) || \ (defined(__sun__) && defined(__svr4__)) || \ defined(_WIN32) || defined(__Fuchsia__) || defined(__rtems__) # define CAN_SANITIZE_UB 1 #else # define CAN_SANITIZE_UB 0 #endif -#endif //CAN_SANITIZE_UB #endif diff --git a/libsanitizer/ubsan/ubsan_type_hash_itanium.cpp b/libsanitizer/ubsan/ubsan_type_hash_itanium.cpp index 4f1708b..d82b542 100644 --- a/libsanitizer/ubsan/ubsan_type_hash_itanium.cpp +++ b/libsanitizer/ubsan/ubsan_type_hash_itanium.cpp @@ -12,7 +12,7 @@ #include "sanitizer_common/sanitizer_platform.h" #include "ubsan_platform.h" -#if CAN_SANITIZE_UB && !SANITIZER_WINDOWS +#if CAN_SANITIZE_UB && !defined(_MSC_VER) #include "ubsan_type_hash.h" #include "sanitizer_common/sanitizer_common.h" diff --git a/libsanitizer/ubsan/ubsan_type_hash_win.cpp b/libsanitizer/ubsan/ubsan_type_hash_win.cpp index 45dcb75..106fa1b 100644 --- a/libsanitizer/ubsan/ubsan_type_hash_win.cpp +++ b/libsanitizer/ubsan/ubsan_type_hash_win.cpp @@ -12,7 +12,7 @@ #include "sanitizer_common/sanitizer_platform.h" #include "ubsan_platform.h" -#if CAN_SANITIZE_UB && SANITIZER_WINDOWS +#if CAN_SANITIZE_UB && defined(_MSC_VER) #include "ubsan_type_hash.h" #include "sanitizer_common/sanitizer_common.h" |