On 10 Sep, [email protected] wrote:
> 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.
Good catch. I had no idea that the error message is in our code.
I'm not sure that this error occurs in the original poudriere build. I
don't know what $HOME is in that environment. It is /root in the
poudriere testport interactive shell.
> 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.
%sysctl kern.elf32.allow_wx kern.elf64.allow_wx
kern.elf32.allow_wx: 1
kern.elf64.allow_wx: 1
> 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.
That should not be a problem. The source tree was freshly unarchived by
the initial poudriere testport. No source changes or configure option
changes were made between that build and the subsequent single-threaded
build retry.
> 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
[SNIP]
Making: all_bridgetest.dpslo
echo ../../unxfbsdi.pro/lib
../../unxfbsdi.pro/lib
cp
/wrkdirs/usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/solver/420/unxfbsdi.pro/bin/udkapi.rdb
../../unxfbsdi.pro/lib/uno_types.rdb
: &&
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/regmerge
../../unxfbsdi.pro/lib/uno_types.rdb / ../../unxfbsdi.pro/bin/bridgetest.rdb
echo \
'<list><filename>bridgetest.component</filename>
<filename>constructors.component</filename>
<filename>cppobj.component</filename>
<filename>testComponent.component</filename></list>' \
> ../../unxfbsdi.pro/misc/uno_services.input
: &&
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}}
xsltproc --nonet --stringparam uri './bridgetest.uno.so' -o
../../unxfbsdi.pro/misc/bridgetest.component \
/wrkdirs/usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/solenv/bin/createcomponent.xslt
bridgetest.component
: &&
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}}
xsltproc --nonet --stringparam uri './constructors.uno.so' -o
../../unxfbsdi.pro/misc/constructors.component \
/wrkdirs/usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/solenv/bin/createcomponent.xslt
constructors.component
: &&
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}}
xsltproc --nonet --stringparam uri './cppobj.uno.so' -o
../../unxfbsdi.pro/misc/cppobj.component \
/wrkdirs/usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/solenv/bin/createcomponent.xslt
cppobj.component
: &&
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}}
xsltproc --nonet --stringparam uri \
'vnd.sun.star.expand:${MY_CLASSDIR_URL}testComponent.jar' -o
../../unxfbsdi.pro/misc/testComponent.component \
/wrkdirs/usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/solenv/bin/createcomponent.xslt
testComponent.component
: &&
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}}
xsltproc --nonet --stringparam prefix
/wrkdirs/usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/testtools/source/bridgetest/../../unxfbsdi.pro/misc/
-o ../../unxfbsdi.pro/lib/uno_services.rdb \
/wrkdirs/usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/solenv/bin/packcomponents.xslt
../../unxfbsdi.pro/misc/uno_services.input
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
> 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.
# bridgetest.rdb is merged in below, so it must be a prerequisite too: without
# it an edit to bridgetest.idl leaves a registry that disagrees with the freshly
# generated headers, and the bridge then dispatches through stale vtable slots.
# $? cannot be used to name the copy source once there are two prerequisites.
$(DLLDEST)$/uno_types.rdb : $(SOLARBINDIR)$/udkapi.rdb $(BIN)$/bridgetest.rdb
echo $(DLLDEST)
$(GNUCOPY) $(SOLARBINDIR)$/udkapi.rdb $@
$(REGMERGE) $@ / $(BIN)$/bridgetest.rdb
> 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
With a fresh build from scratch with debug symbols:
$ lldb solver/420/unxfbsdi.pro/bin/uno --core testoool
(lldb) target create "solver/420/unxfbsdi.pro/bin/uno" --core
"testtools/unxfbsdi.pro/lib/uno.core"
Core file
'/wrkdirs/usr/ports/editors/openoffice-devel/work/aoo-4.2.0/main/testtools/unxfbsdi.pro/lib/uno.core'
(i386) was loaded.
Could not load history file
(lldb) bt
* thread #1, name = 'uno', stop reason = signal SIGSEGV
* frame #0: 0x20f06ad3 libgcc3_uno.so`cpp_vtable_call(nFunctionIndex=47,
nVtableOffset=0, pCallStack=0xffff988c, pReturnValue=0xffff9880
) at cpp2uno.cxx:261:25
frame #1: 0x20efd229 libgcc3_uno.so`privateSnippetExecutorClass at
call.s:148
frame #2: 0x210d9520
bridgetest.uno.so`bridge_test::performTest(xContext=<unavailable>,
xLBT=0xffff9d98, noCurrentContext=<unavailable
>) at bridgetest.cxx:523:38
frame #3: 0x210d7e6c
bridgetest.uno.so`bridge_test::TestBridgeImpl::run(this=0x20f49d00,
rArgs=0xffff9e3c) at bridgetest.cxx:1268:13
frame #4: 0x210dd82f bridgetest.uno.so`non-virtual thunk to
bridge_test::TestBridgeImpl::run() at bridgetest.cxx:0
frame #5: 0x00410a3e uno`sal_main_with_args(argc=9, (null)=<unavailable>)
at unoexe.cxx:857:19
frame #6: 0x0040fef7 uno`main(argc=9, argv=0xffff9efc) at unoexe.cxx:604:1
frame #7: 0x2097ec70 libc.so.7`__libc_start1(argc=9, argv=0xffff9efc,
env=0xffff9f24, cleanup=(ld-elf.so.1`rtld_nop_exit at rtld.c:362
4), mainX=(uno`main at unoexe.cxx:604)) at libc_start1.c:180:7
frame #8: 0x0040f9f8 uno`_start at crt1_s.S:84
> 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]