[Libreoffice-commits] core.git: sw/qa
sw/qa/extras/globalfilter/globalfilter.cxx | 38 - 1 file changed, 21 insertions(+), 17 deletions(-) New commits: commit e03be024ae9c16fa8542757ad2c327259d5b9b0c Author: Dan Horák AuthorDate: Fri Sep 15 11:17:58 2023 +0200 Commit: Michael Stahl CommitDate: Mon Sep 18 11:19:10 2023 +0200 sw/qa/extras/globalfilter: check for pdfium availability A section of testListLabelPDFExport requires pdfium. The pPdfDocument pointer is set to NULL when pdfium is not available, so check it first. This avoids a segfault when LO would be built without pdfium. Change-Id: Ic66a4552c8512702bbfd6d24f5bb581ab824bbe0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156940 Reviewed-by: Michael Stahl Tested-by: Jenkins diff --git a/sw/qa/extras/globalfilter/globalfilter.cxx b/sw/qa/extras/globalfilter/globalfilter.cxx index 64bc2063beb1..3eb328f0b5cc 100644 --- a/sw/qa/extras/globalfilter/globalfilter.cxx +++ b/sw/qa/extras/globalfilter/globalfilter.cxx @@ -1286,23 +1286,27 @@ CPPUNIT_TEST_FIXTURE(Test, testListLabelPDFExport) // Parse the export result with pdfium. std::unique_ptr pPdfDocument = parsePDFExport(); -// The document has one page. -CPPUNIT_ASSERT_EQUAL(1, pPdfDocument->getPageCount()); -std::unique_ptr pPdfPage = pPdfDocument->openPage(/*nIndex=*/0); -CPPUNIT_ASSERT(pPdfPage); - -std::unique_ptr pPdfTextPage = pPdfPage->getTextPage(); -CPPUNIT_ASSERT(pPdfTextPage); - -int nChars = pPdfTextPage->countChars(); -CPPUNIT_ASSERT_EQUAL(22, nChars); - -// Check that the label strings were exported correctly -std::vector aChars(nChars); -for (int i = 0; i < nChars; i++) -aChars[i] = pPdfTextPage->getUnicode(i); -OUString aText(aChars.data(), aChars.size()); - CPPUNIT_ASSERT_EQUAL(OUString(u"\u0623\r\n.\r\n\u0623.\u0623\r\n.\r\n\u0623.\u0623.\u0623\r\n."), aText); +// Non-NULL pPdfDocument means pdfium is available. +if (pPdfDocument != nullptr) +{ +// The document has one page. +CPPUNIT_ASSERT_EQUAL(1, pPdfDocument->getPageCount()); +std::unique_ptr pPdfPage = pPdfDocument->openPage(/*nIndex=*/0); +CPPUNIT_ASSERT(pPdfPage); + +std::unique_ptr pPdfTextPage = pPdfPage->getTextPage(); +CPPUNIT_ASSERT(pPdfTextPage); + +int nChars = pPdfTextPage->countChars(); +CPPUNIT_ASSERT_EQUAL(22, nChars); + +// Check that the label strings were exported correctly +std::vector aChars(nChars); +for (int i = 0; i < nChars; i++) +aChars[i] = pPdfTextPage->getUnicode(i); +OUString aText(aChars.data(), aChars.size()); + CPPUNIT_ASSERT_EQUAL(OUString(u"\u0623\r\n.\r\n\u0623.\u0623\r\n.\r\n\u0623.\u0623.\u0623\r\n."), aText); +} // Parse the document again to get its raw content // TODO: get the content from PDFiumPage somehow
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - bridges/source
bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx | 58 ++-- 1 file changed, 52 insertions(+), 6 deletions(-) New commits: commit ea81248b892f539651a880e16ad865cf99b67070 Author: Dan Horák AuthorDate: Tue Sep 12 10:20:51 2023 +0200 Commit: Stephan Bergmann CommitDate: Wed Sep 13 08:37:38 2023 +0200 bridge/powerpc64: fix integer ABI The ABI document for PowerPC64 specifies that integer values shorter than a doubleword are sign or zero extended as necessary. Until now the smaller values were treated as unsigned values and only zero-extended. Handling of signed values was incorrect. Change-Id: Icbbe8fc8d4facfa6d1b3252c99ec2d8c2552d9f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156847 Tested-by: Jenkins Reviewed-by: Stephan Bergmann (cherry picked from commit 0effeef3dc952959af50c045514bbcd135c37fb7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156873 diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx index 612495d83395..9b66f778dfd6 100644 --- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx @@ -256,6 +256,14 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex, *pDS++ = *reinterpret_cast( pSV ); // verbatim! #define INSERT_INT64( pSV, nr, pGPR, pDS, bOverflow ) \ +if ( nr < ppc64::MAX_GPR_REGS ) \ +pGPR[nr++] = *reinterpret_cast( pSV ); \ +else \ +bOverflow = true; \ +if (bOverflow) \ +*pDS++ = *reinterpret_cast( pSV ); + +#define INSERT_UINT64( pSV, nr, pGPR, pDS, bOverflow ) \ if ( nr < ppc64::MAX_GPR_REGS ) \ pGPR[nr++] = *reinterpret_cast( pSV ); \ else \ @@ -264,6 +272,14 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex, *pDS++ = *reinterpret_cast( pSV ); #define INSERT_INT32( pSV, nr, pGPR, pDS, bOverflow ) \ +if ( nr < ppc64::MAX_GPR_REGS ) \ +pGPR[nr++] = *reinterpret_cast( pSV ); \ +else \ +bOverflow = true; \ +if (bOverflow) \ +*pDS++ = *reinterpret_cast( pSV ); + +#define INSERT_UINT32( pSV, nr, pGPR, pDS, bOverflow ) \ if ( nr < ppc64::MAX_GPR_REGS ) \ pGPR[nr++] = *reinterpret_cast( pSV ); \ else \ @@ -272,6 +288,14 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex, *pDS++ = *reinterpret_cast( pSV ); #define INSERT_INT16( pSV, nr, pGPR, pDS, bOverflow ) \ +if ( nr < ppc64::MAX_GPR_REGS ) \ +pGPR[nr++] = *reinterpret_cast( pSV ); \ +else \ +bOverflow = true; \ +if (bOverflow) \ +*pDS++ = *reinterpret_cast( pSV ); + +#define INSERT_UINT16( pSV, nr, pGPR, pDS, bOverflow ) \ if ( nr < ppc64::MAX_GPR_REGS ) \ pGPR[nr++] = *reinterpret_cast( pSV ); \ else \ @@ -280,6 +304,14 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex, *pDS++ = *reinterpret_cast( pSV ); #define INSERT_INT8( pSV, nr, pGPR, pDS, bOverflow ) \ +if ( nr < ppc64::MAX_GPR_REGS ) \ +pGPR[nr++] = *reinterpret_cast( pSV ); \ +else \ +bOverflow = true; \ +if (bOverflow) \ +*pDS++ = *reinterpret_cast( pSV ); + +#define INSERT_UINT8( pSV, nr, pGPR, pDS, bOverflow ) \ if ( nr < ppc64::MAX_GPR_REGS ) \ pGPR[nr++] = *reinterpret_cast( pSV ); \ else \ @@ -335,7 +367,7 @@ static void cpp_call( #if OSL_DEBUG_LEVEL > 2 fprintf(stderr, "pCppReturn/pUnoReturn is %lx/%lx", pCppReturn, pUnoReturn); #endif -INSERT_INT64( , nGPR, pGPR, pStack, bOverflow ); +INSERT_UINT64( , nGPR, pGPR, pStack, bOverflow ); } } // push "this" pointer @@ -343,7 +375,7 @@ static void cpp_call( #if OSL_DEBUG_LEVEL > 2 fprintf(stderr, "this pointer is %p\n", pAdjustedThisPtr); #endif -INSERT_INT64( , nGPR, pGPR, pStack, bOverflow ); +INSERT_UINT64( , nGPR, pGPR, pStack, bOverflow ); // Args void ** pCppArgs = (void **)alloca( 3 * sizeof(void *) * nParams ); @@ -376,26 +408,40 @@ static void cpp_call( switch (pParamTypeDescr->eTypeClass) { case typelib_TypeClass_HYPER: -case typelib_TypeClass_UNSIGNED_HYPER: #if OSL_DEBUG_LEVEL > 2 fprintf(stderr, "hyper is %lx\n", pCppArgs[nPos]); #endif INSERT_INT64( pCppArgs[nPos], nGPR, pGPR, pStack, bOverflow ); break; +case typelib_TypeClass_UNSIGNED_HYPER: +#if OSL_DEBUG_LEVEL > 2 +
[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - bridges/source
bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx | 58 ++-- 1 file changed, 52 insertions(+), 6 deletions(-) New commits: commit 5eec820938266ea862b7a23ae61f441f191669fc Author: Dan Horák AuthorDate: Tue Sep 12 10:20:51 2023 +0200 Commit: Stephan Bergmann CommitDate: Wed Sep 13 08:24:28 2023 +0200 bridge/powerpc64: fix integer ABI The ABI document for PowerPC64 specifies that integer values shorter than a doubleword are sign or zero extended as necessary. Until now the smaller values were treated as unsigned values and only zero-extended. Handling of signed values was incorrect. Change-Id: Icbbe8fc8d4facfa6d1b3252c99ec2d8c2552d9f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156847 Tested-by: Jenkins Reviewed-by: Stephan Bergmann (cherry picked from commit 6d24e32d0278e1e71cbd1bfdc16899659e47b2a2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156874 diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx index 612495d83395..9b66f778dfd6 100644 --- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx @@ -256,6 +256,14 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex, *pDS++ = *reinterpret_cast( pSV ); // verbatim! #define INSERT_INT64( pSV, nr, pGPR, pDS, bOverflow ) \ +if ( nr < ppc64::MAX_GPR_REGS ) \ +pGPR[nr++] = *reinterpret_cast( pSV ); \ +else \ +bOverflow = true; \ +if (bOverflow) \ +*pDS++ = *reinterpret_cast( pSV ); + +#define INSERT_UINT64( pSV, nr, pGPR, pDS, bOverflow ) \ if ( nr < ppc64::MAX_GPR_REGS ) \ pGPR[nr++] = *reinterpret_cast( pSV ); \ else \ @@ -264,6 +272,14 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex, *pDS++ = *reinterpret_cast( pSV ); #define INSERT_INT32( pSV, nr, pGPR, pDS, bOverflow ) \ +if ( nr < ppc64::MAX_GPR_REGS ) \ +pGPR[nr++] = *reinterpret_cast( pSV ); \ +else \ +bOverflow = true; \ +if (bOverflow) \ +*pDS++ = *reinterpret_cast( pSV ); + +#define INSERT_UINT32( pSV, nr, pGPR, pDS, bOverflow ) \ if ( nr < ppc64::MAX_GPR_REGS ) \ pGPR[nr++] = *reinterpret_cast( pSV ); \ else \ @@ -272,6 +288,14 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex, *pDS++ = *reinterpret_cast( pSV ); #define INSERT_INT16( pSV, nr, pGPR, pDS, bOverflow ) \ +if ( nr < ppc64::MAX_GPR_REGS ) \ +pGPR[nr++] = *reinterpret_cast( pSV ); \ +else \ +bOverflow = true; \ +if (bOverflow) \ +*pDS++ = *reinterpret_cast( pSV ); + +#define INSERT_UINT16( pSV, nr, pGPR, pDS, bOverflow ) \ if ( nr < ppc64::MAX_GPR_REGS ) \ pGPR[nr++] = *reinterpret_cast( pSV ); \ else \ @@ -280,6 +304,14 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex, *pDS++ = *reinterpret_cast( pSV ); #define INSERT_INT8( pSV, nr, pGPR, pDS, bOverflow ) \ +if ( nr < ppc64::MAX_GPR_REGS ) \ +pGPR[nr++] = *reinterpret_cast( pSV ); \ +else \ +bOverflow = true; \ +if (bOverflow) \ +*pDS++ = *reinterpret_cast( pSV ); + +#define INSERT_UINT8( pSV, nr, pGPR, pDS, bOverflow ) \ if ( nr < ppc64::MAX_GPR_REGS ) \ pGPR[nr++] = *reinterpret_cast( pSV ); \ else \ @@ -335,7 +367,7 @@ static void cpp_call( #if OSL_DEBUG_LEVEL > 2 fprintf(stderr, "pCppReturn/pUnoReturn is %lx/%lx", pCppReturn, pUnoReturn); #endif -INSERT_INT64( , nGPR, pGPR, pStack, bOverflow ); +INSERT_UINT64( , nGPR, pGPR, pStack, bOverflow ); } } // push "this" pointer @@ -343,7 +375,7 @@ static void cpp_call( #if OSL_DEBUG_LEVEL > 2 fprintf(stderr, "this pointer is %p\n", pAdjustedThisPtr); #endif -INSERT_INT64( , nGPR, pGPR, pStack, bOverflow ); +INSERT_UINT64( , nGPR, pGPR, pStack, bOverflow ); // Args void ** pCppArgs = (void **)alloca( 3 * sizeof(void *) * nParams ); @@ -376,26 +408,40 @@ static void cpp_call( switch (pParamTypeDescr->eTypeClass) { case typelib_TypeClass_HYPER: -case typelib_TypeClass_UNSIGNED_HYPER: #if OSL_DEBUG_LEVEL > 2 fprintf(stderr, "hyper is %lx\n", pCppArgs[nPos]); #endif INSERT_INT64( pCppArgs[nPos], nGPR, pGPR, pStack, bOverflow ); break; +case typelib_TypeClass_UNSIGNED_HYPER: +#if OSL_DEBUG_LEVEL > 2 +
[Libreoffice-commits] core.git: bridges/source
bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx | 58 ++-- 1 file changed, 52 insertions(+), 6 deletions(-) New commits: commit 6d24e32d0278e1e71cbd1bfdc16899659e47b2a2 Author: Dan Horák AuthorDate: Tue Sep 12 10:20:51 2023 +0200 Commit: Stephan Bergmann CommitDate: Tue Sep 12 19:42:54 2023 +0200 bridge/powerpc64: fix integer ABI The ABI document for PowerPC64 specifies that integer values shorter than a doubleword are sign or zero extended as necessary. Until now the smaller values were treated as unsigned values and only zero-extended. Handling of signed values was incorrect. Change-Id: Icbbe8fc8d4facfa6d1b3252c99ec2d8c2552d9f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156847 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx index 4bb4270806b8..37d75659fdb6 100644 --- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx @@ -256,6 +256,14 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex, *pDS++ = *reinterpret_cast( pSV ); // verbatim! #define INSERT_INT64( pSV, nr, pGPR, pDS, bOverflow ) \ +if ( nr < ppc64::MAX_GPR_REGS ) \ +pGPR[nr++] = *reinterpret_cast( pSV ); \ +else \ +bOverflow = true; \ +if (bOverflow) \ +*pDS++ = *reinterpret_cast( pSV ); + +#define INSERT_UINT64( pSV, nr, pGPR, pDS, bOverflow ) \ if ( nr < ppc64::MAX_GPR_REGS ) \ pGPR[nr++] = *reinterpret_cast( pSV ); \ else \ @@ -264,6 +272,14 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex, *pDS++ = *reinterpret_cast( pSV ); #define INSERT_INT32( pSV, nr, pGPR, pDS, bOverflow ) \ +if ( nr < ppc64::MAX_GPR_REGS ) \ +pGPR[nr++] = *reinterpret_cast( pSV ); \ +else \ +bOverflow = true; \ +if (bOverflow) \ +*pDS++ = *reinterpret_cast( pSV ); + +#define INSERT_UINT32( pSV, nr, pGPR, pDS, bOverflow ) \ if ( nr < ppc64::MAX_GPR_REGS ) \ pGPR[nr++] = *reinterpret_cast( pSV ); \ else \ @@ -272,6 +288,14 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex, *pDS++ = *reinterpret_cast( pSV ); #define INSERT_INT16( pSV, nr, pGPR, pDS, bOverflow ) \ +if ( nr < ppc64::MAX_GPR_REGS ) \ +pGPR[nr++] = *reinterpret_cast( pSV ); \ +else \ +bOverflow = true; \ +if (bOverflow) \ +*pDS++ = *reinterpret_cast( pSV ); + +#define INSERT_UINT16( pSV, nr, pGPR, pDS, bOverflow ) \ if ( nr < ppc64::MAX_GPR_REGS ) \ pGPR[nr++] = *reinterpret_cast( pSV ); \ else \ @@ -280,6 +304,14 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex, *pDS++ = *reinterpret_cast( pSV ); #define INSERT_INT8( pSV, nr, pGPR, pDS, bOverflow ) \ +if ( nr < ppc64::MAX_GPR_REGS ) \ +pGPR[nr++] = *reinterpret_cast( pSV ); \ +else \ +bOverflow = true; \ +if (bOverflow) \ +*pDS++ = *reinterpret_cast( pSV ); + +#define INSERT_UINT8( pSV, nr, pGPR, pDS, bOverflow ) \ if ( nr < ppc64::MAX_GPR_REGS ) \ pGPR[nr++] = *reinterpret_cast( pSV ); \ else \ @@ -339,7 +371,7 @@ static void cpp_call( #if OSL_DEBUG_LEVEL > 2 fprintf(stderr, "pCppReturn/pUnoReturn is %p/%p\n", pCppReturn, pUnoReturn); #endif -INSERT_INT64( , nGPR, pGPR, pStack, bOverflow ); +INSERT_UINT64( , nGPR, pGPR, pStack, bOverflow ); } } // push "this" pointer @@ -347,7 +379,7 @@ static void cpp_call( #if OSL_DEBUG_LEVEL > 2 fprintf(stderr, "this pointer is %p\n", pAdjustedThisPtr); #endif -INSERT_INT64( , nGPR, pGPR, pStack, bOverflow ); +INSERT_UINT64( , nGPR, pGPR, pStack, bOverflow ); // Args void ** pCppArgs = (void **)alloca( 3 * sizeof(void *) * nParams ); @@ -380,26 +412,40 @@ static void cpp_call( switch (pParamTypeDescr->eTypeClass) { case typelib_TypeClass_HYPER: -case typelib_TypeClass_UNSIGNED_HYPER: #if OSL_DEBUG_LEVEL > 2 fprintf(stderr, "hyper is 0x%lx\n", *(sal_Int64 *)pCppArgs[nPos]); #endif INSERT_INT64( pCppArgs[nPos], nGPR, pGPR, pStack, bOverflow ); break; +case typelib_TypeClass_UNSIGNED_HYPER: +#if OSL_DEBUG_LEVEL > 2 +fprintf(stderr, "uhyper is 0x%lx\n", *(sal_Int64 *)pCppArgs[nPos]); +#endif +
[Libreoffice-commits] core.git: bridges/source
bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx | 20 +--- 1 file changed, 12 insertions(+), 8 deletions(-) New commits: commit f171d5cb322ed99b3c4cd6c0b18abbf03882ec98 Author: Dan Horák AuthorDate: Tue Sep 12 10:04:47 2023 +0200 Commit: Stephan Bergmann CommitDate: Tue Sep 12 17:46:49 2023 +0200 bridge: modernize printf debugging in powerpc64 Use correct types and also typecasts to avoid compiler warnings. Change-Id: I3b58ec6a4be54ecd8bc07a7febbaf721eba9b945 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156846 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx index 612495d83395..4bb4270806b8 100644 --- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx @@ -161,13 +161,13 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex, // Let's figure out what is really going on here { fprintf( stderr, "= callVirtualMethod() =\nGPR's (%d): ", nGPR ); -for ( int i = 0; i < nGPR; ++i ) +for ( sal_uInt32 i = 0; i < nGPR; ++i ) fprintf( stderr, "0x%lx, ", pGPR[i] ); fprintf( stderr, "\nFPR's (%d): ", nFPR ); -for ( int i = 0; i < nFPR; ++i ) -fprintf( stderr, "0x%lx (%f), ", pFPR[i], pFPR[i] ); +for ( sal_uInt32 i = 0; i < nFPR; ++i ) +fprintf( stderr, "0x%lx (%lf), ", (sal_Int64)pFPR[i], pFPR[i] ); fprintf( stderr, "\nStack (%d): ", nStack ); -for ( int i = 0; i < nStack; ++i ) +for ( sal_uInt32 i = 0; i < nStack; ++i ) fprintf( stderr, "0x%lx, ", pStack[i] ); fprintf( stderr, "\n" ); } @@ -294,6 +294,10 @@ static void cpp_call( sal_Int32 nParams, typelib_MethodParameter * pParams, void * pUnoReturn, void * pUnoArgs[], uno_Any ** ppUnoExc ) { +#if OSL_DEBUG_LEVEL > 2 +fprintf( stderr, "= cpp_call() =\n" ); +#endif + // max space for: [complex ret ptr], values|ptr ... sal_uInt64 * pStack = (sal_uInt64 *)alloca( (nParams+3) * sizeof(sal_Int64) ); sal_uInt64 * pStackStart = pStack; @@ -333,7 +337,7 @@ static void cpp_call( pCppReturn = (bridges::cpp_uno::shared::relatesToInterfaceType( pReturnTypeDescr ) ? alloca( pReturnTypeDescr->nSize ) : pUnoReturn); #if OSL_DEBUG_LEVEL > 2 -fprintf(stderr, "pCppReturn/pUnoReturn is %lx/%lx", pCppReturn, pUnoReturn); +fprintf(stderr, "pCppReturn/pUnoReturn is %p/%p\n", pCppReturn, pUnoReturn); #endif INSERT_INT64( , nGPR, pGPR, pStack, bOverflow ); } @@ -378,7 +382,7 @@ static void cpp_call( case typelib_TypeClass_HYPER: case typelib_TypeClass_UNSIGNED_HYPER: #if OSL_DEBUG_LEVEL > 2 -fprintf(stderr, "hyper is %lx\n", pCppArgs[nPos]); +fprintf(stderr, "hyper is 0x%lx\n", *(sal_Int64 *)pCppArgs[nPos]); #endif INSERT_INT64( pCppArgs[nPos], nGPR, pGPR, pStack, bOverflow ); break; @@ -386,7 +390,7 @@ static void cpp_call( case typelib_TypeClass_UNSIGNED_LONG: case typelib_TypeClass_ENUM: #if OSL_DEBUG_LEVEL > 2 -fprintf(stderr, "long is %x\n", pCppArgs[nPos]); +fprintf(stderr, "long is 0x%x\n", *(sal_Int32 *)pCppArgs[nPos]); #endif INSERT_INT32( pCppArgs[nPos], nGPR, pGPR, pStack, bOverflow ); break; @@ -448,7 +452,7 @@ static void cpp_call( else // direct way { #if OSL_DEBUG_LEVEL > 2 -fprintf(stderr, "that one, passing %lx through\n", pUnoArgs[nPos]); +fprintf(stderr, "that one, passing %p through\n", pUnoArgs[nPos]); #endif pCppArgs[nPos] = pUnoArgs[nPos]; // no longer needed
[Libreoffice-commits] core.git: sc/qa
sc/qa/unit/functions_array.cxx |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) New commits: commit 3426c96d0e32e0c83e4ce5fdb3405787a0c81e6c Author: Dan Horák AuthorDate: Fri Sep 1 18:45:42 2023 +0200 Commit: Stephan Bergmann CommitDate: Mon Sep 4 14:46:34 2023 +0200 limit tests giving dubious results to x86_64 We have confirmed that ArrayFunctionsTest::testDubiousArrayFormulasFODS gives different results depending on the -ffp-contract setting on ppc64le and likely also on s390x in addition to aarch64. Thus limit the check only to x86_64 where it's known to give consistent results. Change-Id: Iedb63fb4340cfe9a88e374c7498d97574bcdfcc7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156453 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/sc/qa/unit/functions_array.cxx b/sc/qa/unit/functions_array.cxx index 7584c4e0b309..2053c44dfad7 100644 --- a/sc/qa/unit/functions_array.cxx +++ b/sc/qa/unit/functions_array.cxx @@ -27,8 +27,9 @@ void ArrayFunctionsTest::testDubiousArrayFormulasFODS() { //TODO: sc/qa/unit/data/functions/array/dubious/fods/linest.fods produces widely different // values when built with -ffp-contract enabled (-ffp-contract=on default on Clang 14, -// -ffp-contract=fast default when building with optimizations on GCC) on at least aarch64: -#if !((defined __clang__ || defined __GNUC__) && defined __aarch64__) +// -ffp-contract=fast default when building with optimizations on GCC) on at least aarch64 +// and ppc64le. Thus limit the check only to platforms with consistent results. +#if defined X86_64 OUString aDirectoryURL = m_directories.getURLFromSrc(u"/sc/qa/unit/data/functions/array/dubious/fods/"); recursiveScan(test::pass, "OpenDocument Spreadsheet Flat XML", aDirectoryURL,