[PATCH] D58028: Always compare C++ typeinfo (based on libstdc++ implementation).
Martin Liška via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 1 01:25:55 PST 2019
marxin updated this revision to Diff 188861.
marxin added a comment.
Update version where I address last comment.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58028/new/
https://reviews.llvm.org/D58028
Files:
lib/sanitizer_common/sanitizer_platform.h
lib/ubsan/ubsan_type_hash_itanium.cc
Index: lib/ubsan/ubsan_type_hash_itanium.cc
===================================================================
--- lib/ubsan/ubsan_type_hash_itanium.cc
+++ lib/ubsan/ubsan_type_hash_itanium.cc
@@ -118,6 +118,7 @@
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;
Index: lib/sanitizer_common/sanitizer_platform.h
===================================================================
--- lib/sanitizer_common/sanitizer_platform.h
+++ lib/sanitizer_common/sanitizer_platform.h
@@ -285,10 +285,10 @@
# define MSC_PREREQ(version) 0
#endif
-#if defined(__arm64__) && SANITIZER_IOS
-# define SANITIZER_NON_UNIQUE_TYPEINFO 1
-#else
+#if SANITIZER_MAC && !(defined(__arm64__) && SANITIZER_IOS)
# define SANITIZER_NON_UNIQUE_TYPEINFO 0
+#else
+# define SANITIZER_NON_UNIQUE_TYPEINFO 1
#endif
// On linux, some architectures had an ABI transition from 64-bit long double
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58028.188861.patch
Type: text/x-patch
Size: 1098 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190301/2d3934fc/attachment.bin>
More information about the llvm-commits
mailing list