Kaydet (Commit) 69b13a00 authored tarafından Stephan Bergmann's avatar Stephan Bergmann Kaydeden (comit) Caolán McNamara

The gcc3_linux_aarch64 bridge needs to call __cxa_current_exception_type, too

...or else mapException would extract garbage from the fake
exception->exceptionType std::type_info* when catching via
cppu::getCaughtException the rethrown exception thrown via
std::rethrow_exception in Test::testgetCaughtException in
cppuhelper/qa/misc/test_misc.cxx.

6ddecf61 "fillUnoException not working on
std::rethrow_exception exceptions" had adapted the other relevant
bridges/source/cpp_uno/gcc3_*/ cases but missed the gcc3_linux_aarch64 one.

Change-Id: I5a2afb11ad4abf851169bd3fd8ae647cc81c2fcd
Reviewed-on: https://gerrit.libreoffice.org/67542
Tested-by: Jenkins
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
(cherry picked from commit 0c314c90)
Reviewed-on: https://gerrit.libreoffice.org/67548Tested-by: 's avatarRene Engelhard <rene@debian.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 650f3ee4
...@@ -224,10 +224,11 @@ StructKind getStructKind(typelib_CompoundTypeDescription const * type) { ...@@ -224,10 +224,11 @@ StructKind getStructKind(typelib_CompoundTypeDescription const * type) {
namespace abi_aarch64 { namespace abi_aarch64 {
void mapException( void mapException(
__cxa_exception * exception, uno_Any * any, uno_Mapping * mapping) __cxa_exception * exception, std::type_info const * type, uno_Any * any, uno_Mapping * mapping)
{ {
assert(exception != 0); assert(exception != 0);
OUString unoName(toUnoName(exception->exceptionType->name())); assert(type != nullptr);
OUString unoName(toUnoName(type->name()));
typelib_TypeDescription * td = 0; typelib_TypeDescription * td = 0;
typelib_typedescription_getByName(&td, unoName.pData); typelib_typedescription_getByName(&td, unoName.pData);
if (td == 0) { if (td == 0) {
......
...@@ -70,7 +70,7 @@ struct __cxa_eh_globals ...@@ -70,7 +70,7 @@ struct __cxa_eh_globals
}; };
void mapException( void mapException(
__cxa_exception * exception, uno_Any * any, uno_Mapping * mapping); __cxa_exception * exception, std::type_info const * type, uno_Any * any, uno_Mapping * mapping);
void raiseException(uno_Any * any, uno_Mapping * mapping); void raiseException(uno_Any * any, uno_Mapping * mapping);
......
...@@ -192,7 +192,8 @@ void call( ...@@ -192,7 +192,8 @@ void call(
abi_aarch64::mapException( abi_aarch64::mapException(
reinterpret_cast<abi_aarch64::__cxa_eh_globals *>( reinterpret_cast<abi_aarch64::__cxa_eh_globals *>(
__cxxabiv1::__cxa_get_globals())->caughtExceptions, __cxxabiv1::__cxa_get_globals())->caughtExceptions,
*exception, proxy->getBridge()->getCpp2Uno()); __cxxabiv1::__cxa_current_exception_type(), *exception,
proxy->getBridge()->getCpp2Uno());
for (sal_Int32 i = 0; i != count; ++i) { for (sal_Int32 i = 0; i != count; ++i) {
if (cppArgs[i] != 0) { if (cppArgs[i] != 0) {
uno_destructData( uno_destructData(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment