[compiler-rt] r352032 - Always compare C++ typeinfo (based on libstdc++ implementation).
Martin Liska via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 24 00:25:37 PST 2019
Author: marxin
Date: Thu Jan 24 00:25:36 2019
New Revision: 352032
URL: http://llvm.org/viewvc/llvm-project?rev=352032&view=rev
Log:
Always compare C++ typeinfo (based on libstdc++ implementation).
Differential Revision: 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=352032&r1=352031&r2=352032&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:25:36 2019
@@ -285,12 +285,6 @@
# 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=352032&r1=352031&r2=352032&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:25:36 2019
@@ -117,7 +117,7 @@ static bool isDerivedFromAtOffset(const
const abi::__class_type_info *Base,
sptr Offset) {
if (Derived->__type_name == Base->__type_name ||
- (SANITIZER_NON_UNIQUE_TYPEINFO &&
+ (Derived->__type_name[0] != '*' &&
!internal_strcmp(Derived->__type_name, Base->__type_name)))
return Offset == 0;
More information about the llvm-commits
mailing list