Seeking help for Windows aarch64 bridges code

Christian Lohmaier lohmaier+ooofuture at googlemail.com
Thu Apr 6 17:48:48 UTC 2023


Hi *,

there seems to be a bug in the bridges code for windows on arm64, but
I certainly lack skills in assembler and could need some help.

Running the the bridges test (testtools/CustomTarget_uno_test.mk)
seems the most straightforward way to reproduce it I guess...

running
"program": "C:/cygwin64/home/lohma/build/instdir/program/uno.exe",
"args": ["-s", "com.sun.star.test.bridge.BridgeTest", "--",
"com.sun.star.test.bridge.CppTestObject",
"-env:LO_BUILD_LIB_DIR=file:///$W/LinkTarget/Library",
"-env:URE_MORE_SERVICES=file:///$W/Rdb/uno_services.rdb",
"-env:URE_MORE_TYPES=file:///$W/UnoApiTarget/bridgetest.rdb"
"environment": [
{ "name": "W",
"value": "C:/cygwin64/home/lohma/build/workdir"
}]

fails with

Exception has occurred: W32/0xC0000005
Unhandled exception at 0x00007FF9C9967184 (testtools_cppobj.dll) in
uno.exe: 0xC0000005: Access violation writing location
0x123456789ABCDF08.


testtools_cppobj.dll!bridge_object::assign(test::testtools::bridgetest::TestElement
& rData, bool bBool, char16_t cChar, char nByte, short nShort,
unsigned short nUShort, long nLong, unsigned long nULong, __int64
nHyper, unsigned __int64 nUHyper, float fFloat, double fDouble,
test::testtools::bridgetest::TestEnum eEnum, const rtl::OUString &
rStr, char nByte2, short nShort2, const
com::sun::star::uno::Reference<com::sun::star::uno::XInterface> &
xTest, const com::sun::star::uno::Any & rAny) Line 87
(c:\cygwin64\home\lohma\source\libo-core\testtools\source\bridgetest\cppobj.cxx:87)
testtools_cppobj.dll!bridge_object::assign(test::testtools::bridgetest::TestDataElements
& rData, bool bBool, char16_t cChar, char nByte, short nShort,
unsigned short nUShort, long nLong, unsigned long nULong, __int64
nHyper, unsigned __int64 nUHyper, float fFloat, double fDouble,
test::testtools::bridgetest::TestEnum eEnum, const rtl::OUString &
rStr, char nByte2, short nShort2, const
com::sun::star::uno::Reference<com::sun::star::uno::XInterface> &
xTest, const com::sun::star::uno::Any & rAny, const
com::sun::star::uno::Sequence<test::testtools::bridgetest::TestElement>
& rSequence) Line 121
(c:\cygwin64\home\lohma\source\libo-core\testtools\source\bridgetest\cppobj.cxx:121)
testtools_cppobj.dll!bridge_object::`anonymous
namespace'::Test_Impl::setValues(unsigned char bBool, char16_t cChar,
char nByte, short nShort, unsigned short nUShort, long nLong, unsigned
long nULong, __int64 nHyper, unsigned __int64 nUHyper, float fFloat,
double fDouble, test::testtools::bridgetest::TestEnum eEnum, const
rtl::OUString & rStr, char nByte2, short nShort2, const
com::sun::star::uno::Reference<com::sun::star::uno::XInterface> &
xTest, const com::sun::star::uno::Any & rAny, const
com::sun::star::uno::Sequence<test::testtools::bridgetest::TestElement>
& rSequence, const test::testtools::bridgetest::TestDataElements &
rStruct) Line 606
(c:\cygwin64\home\lohma\source\libo-core\testtools\source\bridgetest\cppobj.cxx:606)
msca_uno.dll!callVirtualFunction_fake() Line 4149
(c:\cygwin64\home\lohma\build\workdir\AsmObject\bridges\source\cpp_uno\msvc_win32_arm64\callvirtualfunction.asm:4149)
msca_uno.dll!`anonymous
namespace'::call(bridges::cpp_uno::shared::UnoInterfaceProxy * pProxy,
bridges::cpp_uno::shared::VtableSlot slot,
_typelib_TypeDescriptionReference * returnType, const long count,
_typelib_MethodParameter * parameters, void * returnValue, void * *
arguments, _uno_Any * * exception) Line 160
(c:\cygwin64\home\lohma\source\libo-core\bridges\source\cpp_uno\msvc_win32_arm64\uno2cpp.cxx:160)
msca_uno.dll!unoInterfaceProxyDispatch(_uno_Interface * pUnoI, const
_typelib_TypeDescription * pMemberDescr, void * pReturn, void * *
pArgs, _uno_Any * * ppException) Line 333
(c:\cygwin64\home\lohma\source\libo-core\bridges\source\cpp_uno\msvc_win32_arm64\uno2cpp.cxx:333)
msca_uno.dll!`anonymous
namespace'::call(bridges::cpp_uno::shared::CppInterfaceProxy * proxy,
const com::sun::star::uno::TypeDescription & description,
_typelib_TypeDescriptionReference * returnType, long count,
_typelib_MethodParameter * parameters, unsigned __int64 * gpr,
unsigned __int64 * fpr, unsigned __int64 * stack, void * indirectRet)
Line 128 (c:\cygwin64\home\lohma\source\libo-core\bridges\source\cpp_uno\msvc_win32_arm64\cpp2uno.cxx:128)
msca_uno.dll!vtableCall(long functionIndex, long vtableOffset,
unsigned __int64 * gpr, unsigned __int64 * fpr, unsigned __int64 *
stack, void * indirectRet) Line 314
(c:\cygwin64\home\lohma\source\libo-core\bridges\source\cpp_uno\msvc_win32_arm64\cpp2uno.cxx:314)
msca_uno.dll!vtableSlotCall() Line 4151
(c:\cygwin64\home\lohma\build\workdir\AsmObject\bridges\source\cpp_uno\msvc_win32_arm64\vtableslotcall.asm:4151)
testtools_bridgetest.dll!bridge_test::performTest(const
com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>
& xContext, const
com::sun::star::uno::Reference<test::testtools::bridgetest::XBridgeTest>
& xLBT, bool noCurrentContext) Line 418
(c:\cygwin64\home\lohma\source\libo-core\testtools\source\bridgetest\bridgetest.cxx:418)
testtools_bridgetest.dll!bridge_test::`anonymous
namespace'::TestBridgeImpl::run(const
com::sun::star::uno::Sequence<rtl::OUString> & rArgs) Line 1260
(c:\cygwin64\home\lohma\source\libo-core\testtools\source\bridgetest\bridgetest.cxx:1260)
uno.exe!sal_main() Line 517
(c:\cygwin64\home\lohma\source\libo-core\cpputools\source\unoexe\unoexe.cxx:517)
uno.exe!main(int argc, char * * argv) Line 357
(c:\cygwin64\home\lohma\source\libo-core\cpputools\source\unoexe\unoexe.cxx:357)
uno.exe!invoke_main() Line 78
(d:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78)
uno.exe!__scrt_common_main_seh() Line 288
(d:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
uno.exe!__scrt_common_main() Line 330
(d:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:330)
uno.exe!mainCRTStartup(void * __formal) Line 16
(d:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp:16)
kernel32.dll!00007ffa00512370() (Unknown Source:0)
ntdll.dll!00007ffa010c2eac() (Unknown Source:0)

########
the vtableslotcall.asm and the callvirtualfunction.asm files are
attached (they are generated from
https://git.libreoffice.org/core/+/refs/heads/master/bridges/source/cpp_uno/msvc_win32_arm64/callvirtualfunction.S
and https://git.libreoffice.org/core/+/refs/heads/master/bridges/source/cpp_uno/msvc_win32_arm64/vtableslotcall.S
respectively)

Happy for any pointers...

ciao
Christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: callvirtualfunction.asm
Type: application/octet-stream
Size: 56589 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20230406/cc9e2624/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtableslotcall.asm
Type: application/octet-stream
Size: 56646 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20230406/cc9e2624/attachment-0001.obj>


More information about the LibreOffice mailing list