Charry pick libsanitizer r355488 (PR sanitizer/88684).
2019-03-06 Martin Liska <mliska@suse.cz> PR sanitizer/88684 * sanitizer_common/sanitizer_platform.h (defined): Cherry pick. (SANITIZER_NON_UNIQUE_TYPEINFO): Likewise. * ubsan/ubsan_type_hash_itanium.cc (isDerivedFromAtOffset): Likewise. From-SVN: r269419
This commit is contained in:
parent
d80f04d61e
commit
c24847a54a
@ -1,3 +1,11 @@
|
||||
2019-03-06 Martin Liska <mliska@suse.cz>
|
||||
|
||||
PR sanitizer/88684
|
||||
* sanitizer_common/sanitizer_platform.h (defined): Cherry pick.
|
||||
(SANITIZER_NON_UNIQUE_TYPEINFO): Likewise.
|
||||
* ubsan/ubsan_type_hash_itanium.cc (isDerivedFromAtOffset):
|
||||
Likewise.
|
||||
|
||||
2019-02-20 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR sanitizer/89409
|
||||
|
@ -290,10 +290,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
|
||||
|
@ -117,6 +117,7 @@ static bool isDerivedFromAtOffset(const abi::__class_type_info *Derived,
|
||||
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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user