From dfef2cf502766c4df13dc949d635df115a085f25 Mon Sep 17 00:00:00 2001 From: Evgeniy Stepanov Date: Thu, 28 Jan 2016 19:58:26 +0000 Subject: [PATCH] [cfi] Simplify the code in CfiSlowPathCommon. llvm-svn: 259085 --- compiler-rt/lib/cfi/cfi.cc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/compiler-rt/lib/cfi/cfi.cc b/compiler-rt/lib/cfi/cfi.cc index 8a32ab5..524730f 100644 --- a/compiler-rt/lib/cfi/cfi.cc +++ b/compiler-rt/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); -- 2.7.4