[Libreoffice-commits] core.git: bridges/source
Stephan Bergmann
sbergman at redhat.com
Tue Feb 24 07:53:00 PST 2015
bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx | 29 +++++++++++++++++++---
1 file changed, 26 insertions(+), 3 deletions(-)
New commits:
commit 03736d673ad88d848f327d8c327ebc2dedeb986a
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Feb 24 16:52:29 2015 +0100
Fix MI RTTI (as needed by -fsanitize=vptr)
Change-Id: Idbde54c641531b34f397d07c5f929870c3a82371
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx
index ef00adb..df6c4db 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx
@@ -162,9 +162,32 @@ std::type_info * RTTI::getRTTI(typelib_TypeDescription const & pTypeDescr)
static_cast<__cxxabiv1::__class_type_info *>(
bases[0]));
break;
- case 2:
- //TODO
- break;
+ default:
+ {
+ char * pad = new char[
+ sizeof (__cxxabiv1::__vmi_class_type_info)
+ + ((itd.nBaseTypes - 1)
+ * sizeof (
+ __cxxabiv1::__base_class_type_info))];
+ __cxxabiv1::__vmi_class_type_info * info
+ = new(pad)
+ __cxxabiv1::__vmi_class_type_info(
+ strdup(rttiName),
+ __cxxabiv1::__vmi_class_type_info::__flags_unknown_mask);
+ info->__base_count = itd.nBaseTypes;
+ for (sal_Int32 i = 0; i != itd.nBaseTypes; ++i)
+ {
+ info->__base_info[i].__base_type
+ = static_cast<
+ __cxxabiv1::__class_type_info *>(
+ bases[i]);
+ info->__base_info[i].__offset_flags
+ = (__cxxabiv1::__base_class_type_info::__public_mask
+ | ((8 * i) << __cxxabiv1::__base_class_type_info::__offset_shift));
+ }
+ rtti = info;
+ break;
+ }
}
break;
}
More information about the Libreoffice-commits
mailing list