Hi Don,

The creation of executable memory area failed lines are a red herring

That message is at main/bridges/source/cpp_uno/shared/vtablefactory.cxx:300, and it is misnamed: it's the perror for a failed mkstemp(), not for mmap/mprotect:

if ((block.fd = mkstemp(tmpfname)) == -1)
    perror("creation of executable memory area failed");

FreeBSD (and Linux) build with USE_DOUBLE_MMAP, so the vtable factory wants a temp file in $HOME/.execoooXXXXXX to map twice (RW + RX). In a poudriere/jail build the build user's $HOME isn't writable → EPERM → "Permission denied". Two lines = two createBlock calls.

Two things worth knowing about it:

- There's a real bug in that loop: on mkstemp failure it does break, not continue, so the /tmp retry the loop was written for is unreachable. Every jail build silently drops to the single-mapping fallback. - The fallback is rtl_arena_alloc → mmap(RW) + mprotect(RWX) (vtablefactory.cxx:120-140). If that had failed you'd get std::bad_alloc → abort (134), not 139. Since the process got far enough to print the message twice and then die, the fallback allocation was working. So W^X is probably not your problem — but it's a one-line check if you want to rule it out: sysctl kern.elf32.allow_wx kern.elf64.allow_wx.

The actual failure: error 139 = SIGSEGV in uno, and testtools has a known stale-typelib crash

Look at your own header: WARNING(S): Some modules contain old output trees! Please check: testtools, and you're running build --from testtools incrementally. That is exactly the situation this crash comes from.

On 2026-08-03, 245a583a7b ("Substantially harden the macOS Silicon bridge") inserted new methods into the middle of XBridgeTestBase in bridgetest.idl — echoTwoFloats, echoThreeDoubles, echoMixedFloatLong, echoOneByte, echoThreeLongs, testPackedStack — which shifts every later vtable slot. Four days later 6aebc026b2 fixed the makefile bug that let that go wrong:

▎ The registry merges in bridgetest.rdb but did not depend on it, so an IDL edit left it describing the old interface while the headers and libraries described the new one, and the bridge dispatched the added methods through stale vtable slots. It only ever came out right on a clean build.

That was found on macOS/arm64 and the fix was build-tested only there. A segfault in uno -s BridgeTest -- CppTestObject is that bug's exact signature — bridgetest.cxx maps the object out to binary UNO and back through makeSurrogate(), so the C++ bridge and VtableFactory are fully in play even in-process.

First thing to try: blow away the testtools output tree rather than resuming into it.

rm -rf main/testtools/unxfbsdi.pro
cd main/testtools && build --all

and confirm your snapshot actually contains 6aebc026b2 (main/testtools/source/bridgetest/makefile.mk should list $(BIN)$/bridgetest.rdb as a prerequisite of uno_types.rdb). Your log shows the idl dir and the libs as up-to-date with only the phony runtest re-running, so nothing regenerated on this pass — the rdb you're testing against is whatever the earlier, differently-versioned tree left behind.

If a clean rebuild still segfaults

Then it's the second possibility: those added cases are genuine ABI stress tests (small float structs, mixed float/long, 1-byte struct, packed stack spill) that no x86 bridge had ever been made to pass, and gcc3_freebsd_intel has a real gap. There's precedent — the same hardening left the x86 MSVC bridge failing getCaughtException() (called out explicitly in PR #498). To tell which, get the core:

sysctl kern.corefile
gdb main/solver/420/unxfbsdi.pro/bin/uno /path/to/uno.core   # bt

A backtrace landing in cpp_vtable_call/uno2cpp.cxx/cpp2uno.cxx for one of the new echo* methods means the bridge; a wild jump through a vtable slot with a plausible-but-wrong method means the stale rdb.

As a stopgap for the port, runtest is a test target, not a deliverable — main/testtools/source/bridgetest/makefile.mk:135 already skips it for FREEBSDP (PowerPC) and Solaris SPARC, so adding FREEBSDI there gets the port building while the bridge question is settled.

The exec-memory machinery: untouched for 15 years.

- #define USE_DOUBLE_MMAP got its FREEBSD arm in 812935740b (2011-10-09, "i85126 - FreeBSD port: newer bridge code for amd64"). Before that it was Linux-only. - The mkstemp + perror("creation of executable memory area failed") block itself (vtablefactory.cxx:296-306, including the break that makes the /tmp retry unreachable) dates to cdf0e10c4e — the 2011 initial import from the old OOo hg repo. Inherited, never edited. - The only recent edits to vtablefactory.cxx are d9eb145fce and 245a583a7b (both 2026-08-03), and every line they added is inside #if defined MACOSX && defined AARCH64. On FreeBSD they preprocess away to nothing. I checked the diffs: the non-macOS allocExec path (mmap RW then mprotect RWX) came out of those commits byte-identical.

So those "Permission denied" lines are not a regression — that code has behaved that way on every jail build since forever. Which is a further reason to treat them as noise rather than the cause.

What is recent is the bridgetest side:

- 245a583a7b (2026-08-03) inserted six new methods into the middle of XBridgeTestBase in bridgetest.idl, shifting every later vtable slot. - 6aebc026b2 (2026-08-07) fixed the makefile dependency that let a stale uno_types.rdb survive that IDL edit — "only ever came out right on a clean build."

That's a five-week-old change landing in a tree the build system is explicitly warning has an old output tree for testtools. That timing is the reason I'd clean-rebuild the module before chasing anything else.

HTH
Peter
P.S. The thoughts are claudes not mine. I hope they draw a clear picture.

Am 10.09.2026 um 01:09 schrieb Don Lewis:
I'm trying to build recent AOO42X on FreeBSD x86 and running into a
build failure in testtools/bridgetest.  x64 builds fine, as does a
January snapshot of AOO42X on x86.

I don't know when the breakage happened since I haven't tested any
intermediate snapshots.  I'm hoping that someone might have some
thoughts.

$ build --from testtools
build -- version: -

WARNING(S):
Some modules contain old output trees! Please check: testtools

ATTENTION: If you are performing an incompatible build, please break the build with 
Ctrl+C and prepare the workspace with "--prepare" switch!


=============
Building module testtools
=============

Entering 
/wrkdirs/usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/testtools/source/cliversioning


Entering 
/wrkdirs/usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/testtools/inc


Entering 
/wrkdirs/usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/testtools/source/bridgetest/idl


Entering 
/wrkdirs/usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/testtools/com/sun/star/comp/bridge

Making:    com_sun_star_comp_bridge.dpj

rm -f ../../../../../unxfbsdi.pro/misc/com_sun_star_comp_bridge_dummy.java
rm -f ../../../../../unxfbsdi.pro/misc/com_sun_star_comp_bridge_dummy.java
rm -f ../../../../../unxfbsdi.pro/misc/com_sun_star_comp_bridge_dummy.java
/usr/local/openjdk8/bin/javac -classpath 
".:../../../../../unxfbsdi.pro/class:/usr/local/openjdk8/jre/lib/rt.jar:.:/wrkdirs/usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/solver/420/unxfbsdi.pro/bin/ridl.jar:/wrkdirs/usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/solver/420/unxfbsdi.pro/bin/jurt.jar:/wrkdirs/usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/solver/420/unxfbsdi.pro/bin/juh.jar::/wrkdirs/usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/solver/420/unxfbsdi.pro/lib"
 -d ../../../../../unxfbsdi.pro/class  @/tmp/mkQLFxdC
Note: TestComponent.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Making:    com_sun_star_comp_bridge.dpj

rm -f ../../../../../unxfbsdi.pro/misc/com_sun_star_comp_bridge_manifest
cp -f 
/wrkdirs/usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/testtools/com/sun/star/comp/bridge/manifest
 ../../../../../unxfbsdi.pro/misc/com_sun_star_comp_bridge_manifest
echo Manifest-Version: 1.0 > 
../../../../../unxfbsdi.pro/class/com_sun_star_comp_bridge/META-INF/MANIFEST.MF
echo "Solar-Version: 420m6(Build:9825)" >> 
../../../../../unxfbsdi.pro/class/com_sun_star_comp_bridge/META-INF/MANIFEST.MF
cat ../../../../../unxfbsdi.pro/misc/com_sun_star_comp_bridge_manifest >> 
../../../../../unxfbsdi.pro/class/com_sun_star_comp_bridge/META-INF/MANIFEST.MF
cd ../../../../../unxfbsdi.pro/class/com_sun_star_comp_bridge && zip  -u -rX ../testComponent.jar META-INF/MANIFEST.MF  || ret=$?; if [[ 
"$ret" != "12" && "$ret" != "1" ]] ; then exit $ret ; fi && echo "Nothing to update for 
zip"
        zip warning: ../testComponent.jar not found or empty
   adding: META-INF/MANIFEST.MF (deflated 10%)
cd ../../../../../unxfbsdi.pro/class && zip  -u -rX testComponent.jar com/sun/star/comp/bridge test/testtools/bridgetest  || ret=$?; if [[ 
"$ret" != "12" && "$ret" != "1" ]] ; then exit $ret ; fi && echo "Nothing to update for 
zip"
   adding: com/sun/star/comp/bridge/ (stored 0%)
   adding: com/sun/star/comp/bridge/CurrentContextChecker$1.class (deflated 45%)
   adding: com/sun/star/comp/bridge/TestComponentMain.class (deflated 54%)
   adding: com/sun/star/comp/bridge/TestComponent$_PerformancTestObject.class 
(deflated 65%)
   adding: com/sun/star/comp/bridge/TestComponent$_TestObject$1.class (deflated 
60%)
   adding: com/sun/star/comp/bridge/TestComponent.class (deflated 52%)
   adding: com/sun/star/comp/bridge/TestComponent$_TestObject.class (deflated 
67%)
   adding: com/sun/star/comp/bridge/TestComponentMain$1.class (deflated 31%)
   adding: com/sun/star/comp/bridge/TestComponentMain$Listener.class (deflated 
43%)
   adding: com/sun/star/comp/bridge/TestComponent$_TestObject$CheckFailed.class 
(deflated 39%)
   adding: com/sun/star/comp/bridge/TestComponentMain$InstanceProvider.class 
(deflated 52%)
   adding: com/sun/star/comp/bridge/CurrentContextChecker.class (deflated 48%)
   adding: test/testtools/bridgetest/ (stored 0%)
   adding: test/testtools/bridgetest/Constructors.class (deflated 66%)
   adding: test/testtools/bridgetest/ThreeDoubles.class (deflated 36%)
   adding: test/testtools/bridgetest/MixedFloatLong.class (deflated 35%)
   adding: test/testtools/bridgetest/TestEnum.class (deflated 48%)
   adding: test/testtools/bridgetest/TestSimple.class (deflated 44%)
   adding: test/testtools/bridgetest/Constructors2.class (deflated 85%)
   adding: test/testtools/bridgetest/XRecursiveCall.class (deflated 37%)
   adding: test/testtools/bridgetest/AllFloats.class (deflated 36%)
   adding: test/testtools/bridgetest/OneByte.class (deflated 34%)
   adding: test/testtools/bridgetest/BigStruct.class (deflated 40%)
   adding: test/testtools/bridgetest/MediumStruct.class (deflated 37%)
   adding: test/testtools/bridgetest/TwoFloats.class (deflated 35%)
   adding: test/testtools/bridgetest/XCurrentContextChecker.class (deflated 37%)
   adding: test/testtools/bridgetest/XMultiBase3a.class (deflated 30%)
   adding: test/testtools/bridgetest/SmallStruct.class (deflated 35%)
   adding: test/testtools/bridgetest/TestPolyStruct.class (deflated 43%)
   adding: test/testtools/bridgetest/XMultiBase4.class (deflated 32%)
   adding: test/testtools/bridgetest/TestBadEnum.class (deflated 43%)
   adding: test/testtools/bridgetest/TestStruct.class (deflated 35%)
   adding: test/testtools/bridgetest/XBridgeTest2.class (deflated 57%)
   adding: test/testtools/bridgetest/XMulti.class (deflated 43%)
   adding: test/testtools/bridgetest/XMultiBase7.class (deflated 37%)
   adding: test/testtools/bridgetest/TestElement.class (deflated 46%)
   adding: test/testtools/bridgetest/ThreeLongs.class (deflated 36%)
   adding: test/testtools/bridgetest/BadConstructorArguments.class (deflated 
29%)
   adding: test/testtools/bridgetest/XMultiBase3.class (deflated 40%)
   adding: test/testtools/bridgetest/XMultiBase6.class (deflated 45%)
   adding: test/testtools/bridgetest/TestDataElements.class (deflated 51%)
   adding: test/testtools/bridgetest/XMultiBase5.class (deflated 52%)
   adding: test/testtools/bridgetest/XBridgeTest.class (deflated 50%)
   adding: test/testtools/bridgetest/XMultiBase2.class (deflated 40%)
   adding: test/testtools/bridgetest/XMultiBase1.class (deflated 40%)
   adding: test/testtools/bridgetest/TestPolyStruct2.class (deflated 44%)
   adding: test/testtools/bridgetest/XBridgeTestBase.class (deflated 67%)

Entering 
/wrkdirs/usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/testtools/source/bridgetest

Making:    all_bridgetest.dpslo
cd ../../unxfbsdi.pro/lib && : &&     
LD_LIBRARY_PATH=/wrkdirs/usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/solver/420/unxfbsdi.pro/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
 
/wrkdirs/usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/solver/420/unxfbsdi.pro/bin/uno 
\
                -ro uno_services.rdb -ro uno_types.rdb \
                -s com.sun.star.test.bridge.BridgeTest -- \
                com.sun.star.test.bridge.CppTestObject
creation of executable memory area failed: Permission denied
creation of executable memory area failed: Permission denied
dmake:  Error code 139, while making 'runtest'

1 module(s):
        testtools
need(s) to be rebuilt

Reason(s):

ERROR: error 65280 occurred while making 
/wrkdirs/usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/testtools/source/bridgetest


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to