pre-commit auto remove trailing whitespace from cxx files - #383
Merged
Conversation
Another big auto clean up. So many lines !! Another one bites the dust https://www.youtube.com/watch?v=rY0WxgSXdEE
asf-gitbox-commits
pushed a commit
that referenced
this pull request
Jul 30, 2025
Another big auto clean up. So many lines !! Another one bites the dust https://www.youtube.com/watch?v=rY0WxgSXdEE Co-authored-by: Matthias Seidel <mseidel@apache.org> (cherry picked from commit cf65168)
leginee
added a commit
that referenced
this pull request
Aug 1, 2026
The x64 bridge backport in ebdb555 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>
leginee
added a commit
that referenced
this pull request
Aug 1, 2026
* 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 ebdb555 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Another big auto clean up. So many lines !!
Another one bites the dust
https://www.youtube.com/watch?v=rY0WxgSXdEE