diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-10-13 11:28:34 +0200 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2021-10-13 13:43:09 +0200 |
commit | 239cc612b478d82d3dd73e3a8d5be310b781a5f0 (patch) | |
tree | 152a87922f963880c661c6a935f42980a09594ed /.gitmodules | |
parent | 4e1f5b5eaddac6ff4b3028074edc8f6886d64c3f (diff) |
Extend return values < 32-bit on macOS ARM64
<https://developer.apple.com/documentation/xcode/writing-arm64-code-for-apple-platforms#Pass-Arguments-to-Functions-Correctly>
only mentions function arguments, not return values in "The caller of a function
is responsible for signing or zero-extending any argument with fewer than
32 bits. The standard ABI expects the callee to sign or zero-extend those
arguments." But this appears to also be relevant for return values, where the
callee apparently has to provide properly extended values: Without this change,
in an --enable-optimized build, e.g. selecting "Tools - Macros - Organize Macros
- BeanShell... - LibreOffice Macros - Capitalize - capitalize.bsh" would not
enable the "Run" button, as in SvxScriptOrgDialog::CheckButtons
(cui/source/dialogs/scriptdlg.cxx) node->getType() (which returns a sal_Int16
value, and which calls DefaultBrowseNode::getType,
scripting/source/provider/BrowseNodeFactoryImpl.cxx, which in turn calls
m_xWrappedBrowseNode->getType() on a proxied Java object via the UNO bridge)
would return a value in r0 with bits > 16 left with random values, while the
calling code assumes them to be zero (and exploits that violated assumption with
--enable-optimized).
Change-Id: Ic99dd9e62b49b44e13cdde6158bef7e2296547f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123550
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to '.gitmodules')
0 files changed, 0 insertions, 0 deletions