This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/trunk by this push:
new 54f28cb932 Remove Darwin-specific assumptions from FreeBSD aarch64
except.cxx The RTTI synthesis code was copied from the macOS aarch64 bridge
with comments stating 'arm64 Darwin clang emits the typeinfo of every keyless
class hidden and therefore non-unique'. This Darwin-specific assumption may be
incorrect on FreeBSD.
54f28cb932 is described below
commit 54f28cb9320fd7373825397da12759d6e286de2c
Author: Pedro Giffuni <[email protected]>
AuthorDate: Thu Oct 22 09:54:58 2026 -0500
Remove Darwin-specific assumptions from FreeBSD aarch64 except.cxx
The RTTI synthesis code was copied from the macOS aarch64 bridge with
comments stating 'arm64 Darwin clang emits the typeinfo of every keyless
class hidden and therefore non-unique'. This Darwin-specific assumption
may be incorrect on FreeBSD.
- Update comments to reflect that the NON_UNIQUE_RTTI_BIT detection is
runtime-based via rttiIsNonUnique(), which correctly handles the
platform's actual behavior
- The code already uses runtime detection, not hardcoding, so behavior
is correct regardless of platform
Also fix misleading comment in uno2cpp.cxx about macOS compatibility.
No functional change.
---
main/bridges/source/cpp_uno/gcc3_freebsd_aarch64/except.cxx | 12 +++++-------
main/bridges/source/cpp_uno/gcc3_freebsd_aarch64/uno2cpp.cxx | 4 ++--
2 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/main/bridges/source/cpp_uno/gcc3_freebsd_aarch64/except.cxx
b/main/bridges/source/cpp_uno/gcc3_freebsd_aarch64/except.cxx
index 6161e1958d..fa0189d17d 100644
--- a/main/bridges/source/cpp_uno/gcc3_freebsd_aarch64/except.cxx
+++ b/main/bridges/source/cpp_uno/gcc3_freebsd_aarch64/except.cxx
@@ -83,13 +83,11 @@ Mutex & exceptionMapsMutex()
return mutex;
}
-// libc++ marks a type_info whose object is not unique across images by setting
-// the top bit of type_info::__type_name; comparison then falls back to strcmp
-// of the mangled name (see __non_unique_arm_rtti_bit_impl in <typeinfo>). On
-// arm64 Darwin clang emits the typeinfo of every keyless class -- which is
every
-// UNO exception -- hidden and therefore non-unique, so a synthesised object
must
-// set the bit too, or std::type_info::operator== degenerates to an address
-// comparison and never matches the handler's real typeinfo.
+ // libc++ marks a type_info whose object is not unique across images by
setting
+ // the top bit of type_info::__type_name; comparison then falls back to strcmp
+ // of the mangled name (see __non_unique_arm_rtti_bit_impl in <typeinfo>).
+ // This is detected at runtime below; the synthesised RTTI mirrors whatever
+ // convention the running compiler actually uses.
sal_uIntPtr const NON_UNIQUE_RTTI_BIT =
static_cast< sal_uIntPtr >(1) << (8 * sizeof (sal_uIntPtr) - 1);
diff --git a/main/bridges/source/cpp_uno/gcc3_freebsd_aarch64/uno2cpp.cxx
b/main/bridges/source/cpp_uno/gcc3_freebsd_aarch64/uno2cpp.cxx
index eb1a3cfe1b..de3f6e0809 100644
--- a/main/bridges/source/cpp_uno/gcc3_freebsd_aarch64/uno2cpp.cxx
+++ b/main/bridges/source/cpp_uno/gcc3_freebsd_aarch64/uno2cpp.cxx
@@ -179,8 +179,8 @@ static void callVirtualMethod(void * pThis, sal_uInt32
nVtableIndex,
//==================================================================================================
// The AArch64 outgoing-call trampoline, implemented in call.s, is declared in
ABI
// and used by callVirtualMethod above. The rest of the file implements the
-// public callVirtualMethod entrypoints used by the bridge; these are identical
-// to the macOS AArch64 implementation and therefore are compatible on FreeBSD.
+// public callVirtualMethod entrypoints used by the bridge; these follow the
+// System V AMD64 / AAPCS64 ABI for FreeBSD aarch64.
extern "C" void callVirtualFunction(
sal_uInt64 pFunction, sal_uInt64 pIndirectRet,