[Libreoffice-commits] core.git: bridges/inc bridges/Library_cpp_uno.mk bridges/source Repository.mk solenv/gbuild

2020-09-29 Thread Jan-Marek Glogowski (via logerrit)
 Repository.mk |4 
 bridges/Library_cpp_uno.mk|7 
 bridges/inc/msvc/arm64.hxx|   59 +
 bridges/inc/msvc/except.hxx   |6 
 bridges/source/cpp_uno/msvc_shared/except.cxx |4 
 bridges/source/cpp_uno/msvc_win32_arm64/abi.cxx   |  158 +++
 bridges/source/cpp_uno/msvc_win32_arm64/abi.hxx   |   34 
 bridges/source/cpp_uno/msvc_win32_arm64/callvirtualfunction.S |   72 +
 bridges/source/cpp_uno/msvc_win32_arm64/cpp2uno.cxx   |  432 ++
 bridges/source/cpp_uno/msvc_win32_arm64/except.cxx|  234 +
 bridges/source/cpp_uno/msvc_win32_arm64/uno2cpp.cxx   |  341 +++
 bridges/source/cpp_uno/msvc_win32_arm64/vtableslotcall.S  |   72 +
 solenv/gbuild/platform/com_MSC_class.mk   |   16 
 13 files changed, 1433 insertions(+), 6 deletions(-)

New commits:
commit 03aacdb73d2f797768129d54ac971b48756fa51a
Author: Jan-Marek Glogowski 
AuthorDate: Fri Jul 17 22:59:07 2020 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Wed Sep 30 03:08:36 2020 +0200

bridges: add a Windows Arm64 UNO bridge

Since Microsoft follows the general ARM64 ABI calling conventions,
and the SEH exception handling is the same, this result is a mixed
port of the gcc3_linux_aarch64 bridge and the refactored x86-64
exception handling.

I have no idea, if the complicated 32-bit handling in RaiseInfo()
is needed, as the ARM64 trampolines definitly use 64-bit code.
But since this is the first working version, I currently don't
mind much ;-)

There is definitly more potential for refactoring in the whole
bridges directory...

Change-Id: I9782a2e99c0231cdd1286af156ad312229eccf39
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103642
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/Repository.mk b/Repository.mk
index d0aca4e0e982..1c11c61cb189 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -557,7 +557,9 @@ $(eval $(call 
gb_Helper_register_libraries_for_install,PLAINLIBS_URE,ure, \
) \
log_uno_uno \
unsafe_uno_uno \
-   $(if $(filter MSC,$(COM)),$(if $(filter 
INTEL,$(CPUNAME)),msci,mscx),gcc3)_uno \
+   $(if $(filter MSC,$(COM)), \
+$(if $(filter INTEL,$(CPUNAME)),msci, \
+   $(if $(filter ARM64,$(CPUNAME)),msca,mscx)),gcc3)_uno \
 ))
 
 $(eval $(call gb_Helper_register_libraries_for_install,PRIVATELIBS_URE,ure, \
diff --git a/bridges/Library_cpp_uno.mk b/bridges/Library_cpp_uno.mk
index e1cf6f52cff2..a29f6b56f620 100644
--- a/bridges/Library_cpp_uno.mk
+++ b/bridges/Library_cpp_uno.mk
@@ -21,6 +21,13 @@ $(call gb_LinkTarget_get_target,$(call 
gb_Library_get_linktarget,gcc3_uno)) : \
EXTRAOBJECTLISTS += $(call 
gb_CustomTarget_get_workdir,bridges/source/cpp_uno/gcc3_linux_arm)/armhelper.objectlist
 endif
 
+else ifeq ($(CPUNAME),ARM64)
+
+bridges_SELECTED_BRIDGE := msvc_win32_arm64
+bridge_exception_objects := cpp2uno uno2cpp abi
+bridge_noopt_objects := except
+bridge_asm_objects := callvirtualfunction vtableslotcall
+
 else ifeq ($(CPUNAME),AARCH64)
 
 ifneq ($(filter ANDROID DRAGONFLY FREEBSD LINUX MACOSX NETBSD OPENBSD,$(OS)),)
diff --git a/bridges/inc/msvc/arm64.hxx b/bridges/inc/msvc/arm64.hxx
new file mode 100644
index ..fb095446b097
--- /dev/null
+++ b/bridges/inc/msvc/arm64.hxx
@@ -0,0 +1,59 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include 
+
+#pragma pack(push, 8)
+
+struct ExceptionType final
+{
+sal_Int32 _n0; // flags
+sal_uInt32 _pTypeInfo; // typeinfo
+sal_Int32 _n1, _n2, _n3; // thiscast
+sal_Int32 _n4; // object_size
+sal_uInt32 _pCopyCtor; // copyctor
+ExceptionTypeInfo exc_type_info;
+
+explicit ExceptionType(unsigned char* pCode, sal_uInt64 pCodeBase,
+   typelib_TypeDescription* pTD) throw();
+
+ExceptionType(const ExceptionType&) = delete;
+ExceptionType& 

[Libreoffice-commits] core.git: bridges/inc bridges/Library_cpp_uno.mk bridges/source

2020-09-16 Thread Jan-Marek Glogowski (via logerrit)
 bridges/Library_cpp_uno.mk   |1 
 bridges/inc/msvc/cpp2uno.hxx |   31 +
 bridges/source/cpp_uno/msvc_shared/cpp2uno.cxx   |  354 +++
 bridges/source/cpp_uno/msvc_win32_intel/cpp2uno.cxx  |  319 -
 bridges/source/cpp_uno/msvc_win32_x86-64/cpp2uno.cxx |  303 
 5 files changed, 390 insertions(+), 618 deletions(-)

New commits:
commit 8a56900c61b82e9571d64add833784acfb628853
Author: Jan-Marek Glogowski 
AuthorDate: Sat Sep 5 15:20:51 2020 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Thu Sep 17 00:01:50 2020 +0200

WIN bridges: unify cpp2uno common code

Change-Id: I614fb662b164b0af9ca03c3ab8006b9105380112
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102865
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/bridges/Library_cpp_uno.mk b/bridges/Library_cpp_uno.mk
index 67a66cdadfb5..e1cf6f52cff2 100644
--- a/bridges/Library_cpp_uno.mk
+++ b/bridges/Library_cpp_uno.mk
@@ -273,6 +273,7 @@ $(eval $(call 
gb_Library_add_exception_objects,$(gb_CPPU_ENV)_uno,\
 
 ifeq ($(COM),MSC)
 $(eval $(call gb_Library_add_exception_objects,$(gb_CPPU_ENV)_uno,\
+bridges/source/cpp_uno/msvc_shared/cpp2uno \
 bridges/source/cpp_uno/msvc_shared/except \
 ))
 endif
diff --git a/bridges/inc/msvc/cpp2uno.hxx b/bridges/inc/msvc/cpp2uno.hxx
new file mode 100644
index ..47091ed3bce3
--- /dev/null
+++ b/bridges/inc/msvc/cpp2uno.hxx
@@ -0,0 +1,31 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#define WIN32_LEAN_AND_MEAN
+#include 
+
+#include 
+#include 
+
+typelib_TypeClass __cdecl cpp_mediate(void** pCallStack, sal_Int32 
nFunctionIndex,
+  sal_Int32 nVtableOffset, sal_Int64* 
const pRegisterReturn);
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/msvc_shared/cpp2uno.cxx 
b/bridges/source/cpp_uno/msvc_shared/cpp2uno.cxx
new file mode 100644
index ..51186d1859fc
--- /dev/null
+++ b/bridges/source/cpp_uno/msvc_shared/cpp2uno.cxx
@@ -0,0 +1,354 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#include "bridge.hxx"
+#include "cppinterfaceproxy.hxx"
+#include "types.hxx"
+#include "vtablefactory.hxx"
+
+#include 
+#include 
+
+using namespace ::com::sun::star;
+
+static typelib_TypeClass
+cpp2uno_call(bridges::cpp_uno::shared::CppInterfaceProxy* pThis,
+ const typelib_TypeDescription* pMemberTD,
+ typelib_TypeDescriptionReference* pReturnTypeRef, // nullptr 
indicates void return
+ const sal_Int32 nParams, typelib_MethodParameter* pParams, void** 
pCallStack,
+ void** const pReturnAddr)
+{
+// return type
+typelib_TypeDescription* pReturnTD = nullptr;
+if (pReturnTypeRef)
+TYPELIB_DANGER_GET(, pReturnTypeRef);
+
+// if we don't return via register, the first stack parameter is the 
return value
+int nFirstRealParam = 2;
+if (pReturnAddr == pCallStack)
+++nFirstRealParam;
+
+void* pUnoReturn = nullptr;
+// complex return ptr: if != nullptr && != pUnoReturn, reconversion needed
+void* 

[Libreoffice-commits] core.git: bridges/inc bridges/Library_cpp_uno.mk bridges/source solenv/clang-format

2020-09-16 Thread Jan-Marek Glogowski (via logerrit)
 bridges/Library_cpp_uno.mk   |6 
 bridges/inc/msvc/amd64.hxx   |   48 +
 bridges/inc/msvc/except.hxx  |  118 
 bridges/inc/msvc/x86.hxx |   68 ++
 bridges/source/cpp_uno/msvc_shared/except.cxx|  338 
 bridges/source/cpp_uno/msvc_win32_intel/cpp2uno.cxx  |7 
 bridges/source/cpp_uno/msvc_win32_intel/except.cxx   |  442 ---
 bridges/source/cpp_uno/msvc_win32_intel/uno2cpp.cxx  |4 
 bridges/source/cpp_uno/msvc_win32_x86-64/cpp2uno.cxx |   26 
 bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx  |  530 +--
 bridges/source/cpp_uno/msvc_win32_x86-64/mscx.hxx|   49 -
 bridges/source/cpp_uno/msvc_win32_x86-64/uno2cpp.cxx |4 
 solenv/clang-format/excludelist  |2 
 13 files changed, 628 insertions(+), 1014 deletions(-)

New commits:
commit 8c3ec5ef612a20575e0ebcd5757ba21c47f8
Author: Jan-Marek Glogowski 
AuthorDate: Sun Aug 2 09:02:30 2020 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Thu Sep 17 00:01:21 2020 +0200

WIN bridges: unify exception handling

This is almost just refactoring, but with classes like type_info_
and __type_info, just following the code became tendious. I tried
to come up with better names... and in the end included some minor
code changes described below.

This patch moves the "common" code for MSVC exception handling
into msvc_shared/except.cxx. Still it contains a few small ifdefs,
so it doesn't feel like clean separation, but a lot of duplicate
code is dropped this way.

The "major" code change for amd64 is the drop of the duplicate
static RTTInfo object originally used by mscx_getRTTI and
mscx_getRTTI_len, by merging of both functions into the single,
new get() function to use a single std::find call.

Change-Id: Ib07d40e2794cde79156be3324c80ccf21a6aa8ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102864
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/bridges/Library_cpp_uno.mk b/bridges/Library_cpp_uno.mk
index 0c6b255f52ad..67a66cdadfb5 100644
--- a/bridges/Library_cpp_uno.mk
+++ b/bridges/Library_cpp_uno.mk
@@ -271,6 +271,12 @@ $(eval $(call 
gb_Library_add_exception_objects,$(gb_CPPU_ENV)_uno,\
bridges/source/cpp_uno/shared/vtables \
))
 
+ifeq ($(COM),MSC)
+$(eval $(call gb_Library_add_exception_objects,$(gb_CPPU_ENV)_uno,\
+bridges/source/cpp_uno/msvc_shared/except \
+))
+endif
+
 $(eval $(call gb_Library_add_cxxobjects,$(gb_CPPU_ENV)_uno,\
bridges/source/cpp_uno/shared/cppinterfaceproxy \
, $(gb_COMPILERNOOPTFLAGS) 
$(gb_LinkTarget_EXCEPTIONFLAGS) \
diff --git a/bridges/source/cpp_uno/msvc_win32_intel/msci.hxx 
b/bridges/inc/msvc/amd64.hxx
similarity index 53%
rename from bridges/source/cpp_uno/msvc_win32_intel/msci.hxx
rename to bridges/inc/msvc/amd64.hxx
index 9ee63d338656..fb095446b097 100644
--- a/bridges/source/cpp_uno/msvc_win32_intel/msci.hxx
+++ b/bridges/inc/msvc/amd64.hxx
@@ -16,34 +16,44 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#pragma once
-
-#if !defined WIN32_LEAN_AND_MEAN
-# define WIN32_LEAN_AND_MEAN
-#endif
-#include 
 
-#include "rtl/ustring.hxx"
+#pragma once
 
+#include 
 
-class type_info;
-typedef struct _uno_Any uno_Any;
-typedef struct _uno_Mapping uno_Mapping;
+#pragma pack(push, 8)
 
-namespace CPPU_CURRENT_NAMESPACE
+struct ExceptionType final
 {
+sal_Int32 _n0; // flags
+sal_uInt32 _pTypeInfo; // typeinfo
+sal_Int32 _n1, _n2, _n3; // thiscast
+sal_Int32 _n4; // object_size
+sal_uInt32 _pCopyCtor; // copyctor
+ExceptionTypeInfo exc_type_info;
 
-const DWORD MSVC_ExceptionCode = 0xe06d7363;
-const long MSVC_magic_number = 0x19930520L;
+explicit ExceptionType(unsigned char* pCode, sal_uInt64 pCodeBase,
+   typelib_TypeDescription* pTD) throw();
 
-type_info * msci_getRTTI( OUString const & rUNOname );
+ExceptionType(const ExceptionType&) = delete;
+ExceptionType& operator=(const ExceptionType&) = delete;
+};
+
+struct RaiseInfo final
+{
+sal_Int32 _n0;
+sal_uInt32 _pDtor;
+sal_Int32 _n2;
+sal_uInt32 _types;
 
-int msci_filterCppException(
-EXCEPTION_POINTERS * pPointers, uno_Any * pUnoExc, uno_Mapping * pCpp2Uno 
);
+// Additional fields
+typelib_TypeDescription* _pTD;
+unsigned char* _code;
+sal_uInt64 _codeBase;
 
-void msci_raiseException(
-uno_Any * pUnoExc, uno_Mapping * pUno2Cpp );
+explicit RaiseInfo(typelib_TypeDescription* pTD) throw();
+};
 
-}
+#pragma pack(pop)
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/inc/msvc/except.hxx b/bridges/inc/msvc/except.hxx
new file mode 100644
index ..8ed49a887a24
--- 

[Libreoffice-commits] core.git: bridges/inc bridges/Library_cpp_uno.mk bridges/source

2019-12-18 Thread Stephan Bergmann (via logerrit)
 bridges/Library_cpp_uno.mk   |4 -
 bridges/inc/cppinterfaceproxy.hxx|5 -
 bridges/source/cpp_uno/msvc_win32_intel/dllinit.cxx  |   49 ---
 bridges/source/cpp_uno/msvc_win32_x86-64/dllinit.cxx |   44 -
 bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx  |   24 -
 5 files changed, 4 insertions(+), 122 deletions(-)

New commits:
commit 60274d430881ffe8681a2920b4df589d16942ace
Author: Stephan Bergmann 
AuthorDate: Wed Dec 18 10:30:41 2019 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Dec 18 13:02:20 2019 +0100

Elide use of rtl_Instance (which is obsoleted by C++11 thread-safe statics),

...redux, after 8473ac2e27efff3ec902a358896a669ce05f047a "Elide use of
rtl_Instance (which is obsoleted by C++11 thread-safe statics)" had done the
same in parallel but forgot to remove some now-unnecessary parts:

There appears to be no good reason to control the lifecycle of the 
VtableFactory
instance via dso_init/exit, instead of via a plain static local variable.

This removes the need for the Windows DllMain functions.  They also called
DisableThreadLibraryCalls, which disables the DLL_THREAD_ATTACH and
DLL_THREAD_DETACH notifications for the respective DllMain.  Lets assume 
that
this was only done (as an optimization) because there had to be a 
user-provided
DllMain, and that it was not in itself a reason to have a user-provided 
DllMain.
(Most other DllMain across the code base that call DisableThreadLibraryCalls
also do something else.  The only DllMain that only calls
DisableThreadLibraryCalls is the one in
shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx, introduced with
3fbfb21e298ba506c50733d4aaefc7550bca2fe4 "INTEGRATION: CWS desktintgr02".)

Change-Id: I696e1c8d49060853c1a2c24f67469f6adfea6801
Reviewed-on: https://gerrit.libreoffice.org/85367
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/bridges/Library_cpp_uno.mk b/bridges/Library_cpp_uno.mk
index 277c54cf79dc..adb404244319 100644
--- a/bridges/Library_cpp_uno.mk
+++ b/bridges/Library_cpp_uno.mk
@@ -79,7 +79,7 @@ bridge_exception_objects := cpp2uno except uno2cpp
 bridge_noncallexception_objects := callvirtualmethod
 else ifeq ($(COM),MSC)
 bridges_SELECTED_BRIDGE := msvc_win32_intel
-bridge_exception_objects := cpp2uno dllinit uno2cpp
+bridge_exception_objects := cpp2uno uno2cpp
 bridge_noopt_objects := except
 endif
 
@@ -174,7 +174,7 @@ bridge_exception_objects := abi call cpp2uno except uno2cpp
 bridge_noncallexception_noopt_objects := callvirtualmethod
 else ifeq ($(COM),MSC)
 bridges_SELECTED_BRIDGE := msvc_win32_x86-64
-bridge_exception_objects := cpp2uno dllinit uno2cpp
+bridge_exception_objects := cpp2uno uno2cpp
 bridge_noopt_objects := except
 bridge_asm_objects := call
 endif
diff --git a/bridges/inc/cppinterfaceproxy.hxx 
b/bridges/inc/cppinterfaceproxy.hxx
index 4755ea90bced..7d5ab7b167b2 100644
--- a/bridges/inc/cppinterfaceproxy.hxx
+++ b/bridges/inc/cppinterfaceproxy.hxx
@@ -36,11 +36,6 @@ namespace com { namespace sun { namespace star { namespace 
uno {
 class XInterface;
 } } } }
 
-#if !defined __GNUG__
-void dso_init();
-void dso_exit();
-#endif
-
 namespace bridges { namespace cpp_uno { namespace shared {
 
 class Bridge;
diff --git a/bridges/source/cpp_uno/msvc_win32_intel/dllinit.cxx 
b/bridges/source/cpp_uno/msvc_win32_intel/dllinit.cxx
deleted file mode 100644
index f65ef74ba4e5..
--- a/bridges/source/cpp_uno/msvc_win32_intel/dllinit.cxx
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-
-#if !defined WIN32_LEAN_AND_MEAN
-# define WIN32_LEAN_AND_MEAN
-#endif
-#include 
-
-
-void dso_init();
-void dso_exit();
-
-
-extern "C" BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID 
lpvReserved)
-{
-switch(dwReason) {
-case DLL_PROCESS_ATTACH:
-DisableThreadLibraryCalls(hModule);
-
-dso_init();
-break;
-
-case DLL_PROCESS_DETACH:
-if (!lpvReserved)
-dso_exit();
- 

[Libreoffice-commits] core.git: bridges/inc bridges/Library_cpp_uno.mk bridges/source

2014-08-07 Thread Stephan Bergmann
 bridges/Library_cpp_uno.mk  |2 
 bridges/inc/bridges/cpp_uno/shared/vtablefactory.hxx|   14 +
 bridges/source/cpp_uno/gcc3_aix_powerpc/cpp2uno.cxx |3 
 bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm.cxx |3 
 bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm64.cxx   |3 
 bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-i386.cxx|3 
 bridges/source/cpp_uno/gcc3_linux_alpha/cpp2uno.cxx |3 
 bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx   |3 
 bridges/source/cpp_uno/gcc3_linux_hppa/cpp2uno.cxx  |3 
 bridges/source/cpp_uno/gcc3_linux_ia64/cpp2uno.cxx  |2 
 bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx |3 
 bridges/source/cpp_uno/gcc3_linux_m68k/cpp2uno.cxx  |3 
 bridges/source/cpp_uno/gcc3_linux_mips/cpp2uno.cxx  |3 
 bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx   |3 
 bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx |3 
 bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx  |3 
 bridges/source/cpp_uno/gcc3_linux_s390x/cpp2uno.cxx |3 
 bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx |3 
 bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx|   11 +
 bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx |  130 
 bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx  |1 
 bridges/source/cpp_uno/gcc3_macosx_intel/cpp2uno.cxx|3 
 bridges/source/cpp_uno/gcc3_macosx_powerpc/cpp2uno.cxx  |3 
 bridges/source/cpp_uno/gcc3_macosx_x86-64/cpp2uno.cxx   |3 
 bridges/source/cpp_uno/gcc3_solaris_intel/cpp2uno.cxx   |3 
 bridges/source/cpp_uno/gcc3_solaris_sparc/cpp2uno.cxx   |3 
 bridges/source/cpp_uno/mingw_intel/cpp2uno.cxx  |3 
 bridges/source/cpp_uno/mingw_x86-64/cpp2uno.cxx |3 
 bridges/source/cpp_uno/msvc_win32_intel/cpp2uno.cxx |3 
 bridges/source/cpp_uno/msvc_win32_x86-64/cpp2uno.cxx|3 
 bridges/source/cpp_uno/shared/vtablefactory.cxx |   15 +
 31 files changed, 83 insertions(+), 164 deletions(-)

New commits:
commit 9c9f0ea2c38929d133b0fe2faf616ecab17e07c9
Author: Stephan Bergmann sberg...@redhat.com
Date:   Thu Aug 7 18:21:08 2014 +0200

Include RTTI in generated vtables for ubsan's vptr-based checks

...though only on gcc3_linux_x86-64 for now.

Change-Id: Id90554425e78b38a5a97149f2a7d3ac04cbe0c9b

diff --git a/bridges/Library_cpp_uno.mk b/bridges/Library_cpp_uno.mk
index d929c86..e971442 100644
--- a/bridges/Library_cpp_uno.mk
+++ b/bridges/Library_cpp_uno.mk
@@ -125,7 +125,7 @@ ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD 
OPENBSD,$(OS)),)
 bridges_SELECTED_BRIDGE := gcc3_linux_x86-64
 bridge_asm_objects := call
 bridge_noncallexception_noopt_objects := callvirtualmethod
-bridge_exception_objects := abi cpp2uno except uno2cpp
+bridge_exception_objects := abi cpp2uno except rtti uno2cpp
 else ifeq ($(OS),MACOSX)
 bridges_SELECTED_BRIDGE := gcc3_macosx_x86-64
 bridge_exception_objects := abi call cpp2uno except uno2cpp
diff --git a/bridges/inc/bridges/cpp_uno/shared/vtablefactory.hxx 
b/bridges/inc/bridges/cpp_uno/shared/vtablefactory.hxx
index 613358d..5b4b06b 100644
--- a/bridges/inc/bridges/cpp_uno/shared/vtablefactory.hxx
+++ b/bridges/inc/bridges/cpp_uno/shared/vtablefactory.hxx
@@ -128,9 +128,11 @@ private:
 
 void freeBlock(Block const  block) const;
 
-void createVtables(
+sal_Int32 createVtables(
 GuardedBlocks  blocks, BaseOffset const  baseOffset,
-typelib_InterfaceTypeDescription * type, bool includePrimary) const;
+typelib_InterfaceTypeDescription * type, sal_Int32 vtableNumber,
+typelib_InterfaceTypeDescription * mostDerived, bool includePrimary)
+const;
 
 // This function is not defined in the generic part, but instead has to be
 // defined individually for each CPP--UNO bridge:
@@ -150,9 +152,15 @@ private:
 
 @param block  the start address of the raw vtable block
 @param slotCount  the number of slots
+@param vtableNumber  zero-based count across all the most derived 
type's
+vtables (for vtable's offset to top slot)
+@param type  non-null most derived type (for vtable's typeinfo 
pointer
+slot)
 @return  a pointer past the last vtable slot
  */
-static Slot * initializeBlock(void * block, sal_Int32 slotCount);
+static Slot * initializeBlock(
+void * block, sal_Int32 slotCount, sal_Int32 vtableNumber,
+typelib_InterfaceTypeDescription * type);
 
 // This function is not defined in the generic part, but instead has to be
 // defined individually for each CPP--UNO bridge:
diff --git a/bridges/source/cpp_uno/gcc3_aix_powerpc/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_aix_powerpc/cpp2uno.cxx
index d98d32f..33bb5fa 100644
--- a/bridges/source/cpp_uno/gcc3_aix_powerpc/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_aix_powerpc/cpp2uno.cxx
@@ -579,7 +579,8 @@