From 9e591805afd928e55f2baced405622215801183d Mon Sep 17 00:00:00 2001 From: Evgeniy Stepanov Date: Thu, 28 Jan 2016 19:58:26 +0000 Subject: [cfi] Simplify the code in CfiSlowPathCommon. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@259085 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/cfi/cfi.cc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'lib/cfi/cfi.cc') diff --git a/lib/cfi/cfi.cc b/lib/cfi/cfi.cc index 8a32ab59d..524730f81 100644 --- a/lib/cfi/cfi.cc +++ b/lib/cfi/cfi.cc @@ -303,20 +303,15 @@ ALWAYS_INLINE void CfiSlowPathCommon(u64 CallSiteTypeId, void *Ptr, VReport(3, "__cfi_slowpath: %llx, %p\n", CallSiteTypeId, Ptr); ShadowValue sv = ShadowValue::load(Addr); if (sv.is_invalid()) { - // FIXME: call the ubsan handler if DiagData != nullptr? VReport(1, "CFI: invalid memory region for a check target: %p\n", Ptr); #ifdef CFI_ENABLE_DIAG if (DiagData) { __ubsan_handle_cfi_check_fail( - reinterpret_cast<__ubsan::CFICheckFailData *>(DiagData), - reinterpret_cast(Ptr)); + reinterpret_cast<__ubsan::CFICheckFailData *>(DiagData), Addr); return; - } else { - Trap(); } -#else - Trap(); #endif + Trap(); } if (sv.is_unchecked()) { VReport(2, "CFI: unchecked call (shadow=FFFF): %p\n", Ptr); -- cgit v1.2.3