| 22994af5 | 24-Oct-2026 |
Pedro Giffuni <10236985+pgiffuni@users.noreply.github.com> |
Merge pull request #512 from pkubaj/ppc64-fix
FreeBSD PowerPC64: fix the C++-UNO bridge, build on little-endian
I am happy with this change as it completes the series of support for different FreeB
Merge pull request #512 from pkubaj/ppc64-fix
FreeBSD PowerPC64: fix the C++-UNO bridge, build on little-endian
I am happy with this change as it completes the series of support for different FreeBSD platforms, and AOO is likely to get shipped and well tested there.
We should check why BridgeTest was disabled for PowerPC: sadly we don't have resources to look at all PPC platforms.
show more ...
|
| 90aa4121 | 22-Oct-2026 |
Piotr Kubaj <pkubaj@FreeBSD.org> |
FreeBSD PowerPC64 bridge: return small structs in registers
The bridge used a hidden return pointer for every struct, but under the ELFv2 ABI structs of up to 16 bytes come back in r3/r4, and struct
FreeBSD PowerPC64 bridge: return small structs in registers
The bridge used a hidden return pointer for every struct, but under the ELFv2 ABI structs of up to 16 bytes come back in r3/r4, and structs made of up to eight floats or doubles come back in f1-f8. Calling a C++ method that returns such a struct from Basic, Python or Java, e.g. getCellAddress() or getPosition(), passed the return buffer where the callee expected this, and the testtools bridgetest crashed.
Use return_in_hidden_param() for both call directions and for the vtable snippets, pass f1-f8 to MapReturn(), and load f1-f8 in privateSnippetExecutor when a C++ caller expects such a float struct.
With this the bridgetest passes on FreeBSD 15.1 powerpc64 and powerpc64le, in-process and over URP, against both the C++ and the Java test objects.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
show more ...
|
| 78c44356 | 22-Oct-2026 |
Pedro Giffuni <pfg@apache.org> |
Fix missing variable reference in FreeBSD ARM bridge makefile
The make condition had a missing $ before OS, causing the build configuration block to never match. This would result in an empty bridge
Fix missing variable reference in FreeBSD ARM bridge makefile
The make condition had a missing $ before OS, causing the build configuration block to never match. This would result in an empty bridge library being built.
show more ...
|
| 32049e8c | 22-Oct-2026 |
Pedro Giffuni <pfg@FreeBSD.org> |
Fix FreeBSD aarch64 C++-UNO bridge stack handling for AAPCS64
Ensure each stack argument occupies a full 8-byte slot per AAPCS64 requirements. Small types (BYTE, SHORT, LONG, BOOLEAN, etc.) are now
Fix FreeBSD aarch64 C++-UNO bridge stack handling for AAPCS64
Ensure each stack argument occupies a full 8-byte slot per AAPCS64 requirements. Small types (BYTE, SHORT, LONG, BOOLEAN, etc.) are now sign/zero-extended into a sal_uInt64 scratch slot before being copied to the stack, preventing garbage values from uninitialized upper bytes.
This fixes the testPackedStack BridgeTest failure where nStack was 24 instead of the expected 48, and resolves the cascading transportAny crash caused by corrupt stack values.
show more ...
|
| a95bc489 | 21-Oct-2026 |
Pedro Giffuni <pfg@FreeBSD.org> |
freebsd_aarch64: Fix stack alignment and return handling
Fix two issues in the FreeBSD aarch64 C++-UNO bridge:
1. abi.cxx: align_stack_offset and stack_size now use the type's natural alignment
freebsd_aarch64: Fix stack alignment and return handling
Fix two issues in the FreeBSD aarch64 C++-UNO bridge:
1. abi.cxx: align_stack_offset and stack_size now use the type's natural alignment (nAlignment) and raw size (nSize) instead of hardcoded 8/alignment and 8-byte slot rounding. This matches the AAPCS64/System V ABI requirement that stack arguments use their natural alignment and size, matching the macOS reference.
2. uno2cpp.cxx: Restructure the return-value switch to use 'default' with a bSimpleReturn check (matching the macOS reference), so fill_struct is only called for register-returned aggregates, not for types that use the x8 hidden-result buffer.
show more ...
|
| 9ff3e225 | 03-Aug-2026 |
Jim Jagielski <jimjag@gmail.com> |
Synthesise UNO exception RTTI on macOS/arm64
RTTI::getRTTI() in the arm64 C++-UNO bridge resolved exception type_info via dlsym(RTLD_DEFAULT, "_ZTIN...E"). On arm64 Darwin this can never succeed: cl
Synthesise UNO exception RTTI on macOS/arm64
RTTI::getRTTI() in the arm64 C++-UNO bridge resolved exception type_info via dlsym(RTLD_DEFAULT, "_ZTIN...E"). On arm64 Darwin this can never succeed: clang emits the typeinfo of any keyless class - which is every UNO exception - as hidden regardless of visibility attributes, version scripts, or export lists, whereas the same class gets exported typeinfo on x86_64 Darwin.
show more ...
|
| 079530e0 | 01-Aug-2026 |
Peter <leginee@users.noreply.github.com> |
Win64 bridge backport (#492)
* bridges/msvc_win64: pass simple argument values, not the temp's address
uno2cpp.cxx converts each simple by-value argument into an 8-byte alloca temp and stores the p
Win64 bridge backport (#492)
* bridges/msvc_win64: pass simple argument values, not the temp's address
uno2cpp.cxx converts each simple by-value argument into an 8-byte alloca temp and stores the pointer in pCppArgs[nPos]:
uno_copyAndConvertData( pCppArgs[nPos] = alloca( 8 ), ... );
Copying the value into the outgoing slot therefore has to dereference that pointer. The marshalling switch used &pCppArgs[nPos] instead, which reads the pCppArgs array slot itself, i.e. the temp's address -- so every HYPER, LONG, ENUM, SHORT, CHAR, BOOLEAN, BYTE, FLOAT and DOUBLE parameter reached the callee as a stack address (or its low 16/32 bits) rather than a value.
The same expression is correct in the complex/ref branch, where the pointer IS the argument; written there as (sal_uInt64)pCppArgs[nPos] to make the difference between the two branches obvious.
This only affects calls that cross between the uno and cpp environments, so a pure-C++ session never trips it; it surfaces via pyuno and the invocation adapters.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* bridges/msvc_win64: return queryInterface's Any in the hidden return buffer
The Win64 call stack is "ret addr, this, [ret *], params", so a method with a hidden return pointer finds it at pCallStack[2] -- cpp2uno_call() reads pCppReturn from [2], and the queryInterface shortcut in cpp_mediate() reads its Type argument from [3] accordingly.
That shortcut nevertheless built the returned Any at pCallStack[1] and returned [1] in the register slot. [1] is `this`, so it constructed a 24-byte Any over the proxy object and never wrote the caller's own return buffer. The caller then read and destructed an uninitialised Any, faulting in uno_any_destruct() on a stale stack value used as a typelib_TypeDescription*.
The x86 bridge has always used pCallStack[2] here; the Win64 port carried over the x86 index, where the layout puts the hidden pointer before `this`.
Reproducer: any queryInterface on a raw uno_Interface proxy -- e.g. pyuno's Adapter::getOutIndexes() inspecting an InvocationAdapterFactory adapter, which crashed on every use of the Python macro organiser.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* pre-commit: fix whitespace in the msvc_win64 bridge sources
The x64 bridge backport in ebdb555ed2 brought these files over from origin/windows-amd64, a branch predating the tree-wide whitespace cleanups in #383 and #462, so it silently reintroduced trailing whitespace in the license headers of call.asm, cpp2uno.cxx and except.cxx plus a stray blank line at the end of except.cxx.
Since the pre-commit workflow runs with --all-files, this fails the check on every pull request against trunk, not just ones touching these files.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
show more ...
|
| 9d1a529d | 08-Jun-2026 |
Jim Jagielski <jimjag@gmail.com> |
Fix crash, uninitialized-return, and buffer bugs in update check and macOS x86 bridge
updateprotocol.cxx: guard XNodeList dereferences so a swallowed XPathException no longer leaves a null reference
Fix crash, uninitialized-return, and buffer bugs in update check and macOS x86 bridge
updateprotocol.cxx: guard XNodeList dereferences so a swallowed XPathException no longer leaves a null reference to be dereferenced (crash on malformed/hostile update descriptors); clear the list before the relnote query so a thrown exception can't leave us iterating the previous (sources) node list.
cpp2uno.cxx: the queryInterface fast-path guard used 'break', which exited the switch and skipped the default case, returning an uninitialized typelib_TypeClass. Guard the block with 'if (bHasHiddenReturn)' instead so control falls through to default and eRet is always assigned.
updatecheck.cxx (getImageFromFileName): use bitwise '|' instead of logical '||' when combining osl_Process flags; rewrite the trailing CR/LF trim so it never reads/writes before the start of the buffer (e.g. when osl_readFile returns 0 bytes).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
show more ...
|