[compiler-rt] r257233 - [cfi] Fix __cfi_slowpath and __cfi_check signature.
Evgeniy Stepanov via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 8 15:42:30 PST 2016
Author: eugenis
Date: Fri Jan 8 17:42:30 2016
New Revision: 257233
URL: http://llvm.org/viewvc/llvm-project?rev=257233&view=rev
Log:
[cfi] Fix __cfi_slowpath and __cfi_check signature.
The first argument is uint64_t, not uintptr_t.
Modified:
compiler-rt/trunk/lib/cfi/cfi.cc
Modified: compiler-rt/trunk/lib/cfi/cfi.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/cfi/cfi.cc?rev=257233&r1=257232&r2=257233&view=diff
==============================================================================
--- compiler-rt/trunk/lib/cfi/cfi.cc (original)
+++ compiler-rt/trunk/lib/cfi/cfi.cc Fri Jan 8 17:42:30 2016
@@ -42,7 +42,7 @@ static uint16_t *mem_to_shadow(uptr x) {
return (uint16_t *)(__cfi_shadow + ((x >> kShadowGranularity) << 1));
}
-typedef int (*CFICheckFn)(uptr, void *);
+typedef int (*CFICheckFn)(u64, void *);
class ShadowValue {
uptr addr;
@@ -189,9 +189,9 @@ static void init_shadow() {
}
extern "C" SANITIZER_INTERFACE_ATTRIBUTE
-void __cfi_slowpath(uptr CallSiteTypeId, void *Ptr) {
+void __cfi_slowpath(u64 CallSiteTypeId, void *Ptr) {
uptr Addr = (uptr)Ptr;
- VReport(3, "__cfi_slowpath: %zx, %p\n", CallSiteTypeId, Ptr);
+ VReport(3, "__cfi_slowpath: %llx, %p\n", CallSiteTypeId, Ptr);
ShadowValue sv = ShadowValue::load(Addr);
if (sv.is_invalid()) {
VReport(2, "CFI: invalid memory region for a function pointer (shadow==0): %p\n", Ptr);
More information about the llvm-commits
mailing list