[compiler-rt] r352033 - Revert https://reviews.llvm.org/D56485.

Martin Liska via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 24 00:46:06 PST 2019


Author: marxin
Date: Thu Jan 24 00:46:06 2019
New Revision: 352033

URL: http://llvm.org/viewvc/llvm-project?rev=352033&view=rev
Log:
Revert https://reviews.llvm.org/D56485.

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform.h
    compiler-rt/trunk/lib/ubsan/ubsan_type_hash_itanium.cc

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform.h?rev=352033&r1=352032&r2=352033&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform.h Thu Jan 24 00:46:06 2019
@@ -285,6 +285,12 @@
 # define MSC_PREREQ(version) 0
 #endif
 
+#if defined(__arm64__) && SANITIZER_IOS
+# define SANITIZER_NON_UNIQUE_TYPEINFO 1
+#else
+# define SANITIZER_NON_UNIQUE_TYPEINFO 0
+#endif
+
 // On linux, some architectures had an ABI transition from 64-bit long double
 // (ie. same as double) to 128-bit long double.  On those, glibc symbols
 // involving long doubles come in two versions, and we need to pass the

Modified: compiler-rt/trunk/lib/ubsan/ubsan_type_hash_itanium.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/ubsan_type_hash_itanium.cc?rev=352033&r1=352032&r2=352033&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/ubsan_type_hash_itanium.cc (original)
+++ compiler-rt/trunk/lib/ubsan/ubsan_type_hash_itanium.cc Thu Jan 24 00:46:06 2019
@@ -117,7 +117,7 @@ static bool isDerivedFromAtOffset(const
                                   const abi::__class_type_info *Base,
                                   sptr Offset) {
   if (Derived->__type_name == Base->__type_name ||
-      (Derived->__type_name[0] != '*' &&
+      (SANITIZER_NON_UNIQUE_TYPEINFO &&
        !internal_strcmp(Derived->__type_name, Base->__type_name)))
     return Offset == 0;
 




More information about the llvm-commits mailing list