Some versions of gcc clobber one of the registries that are used to pass
arguments in the function's prologue, like:
Dump of assembler code for function (anonymous namespace)::privateSnippetExecutor():
510 {
0x00003fffaffe8454 <+0>: mflr r0
0x00003fffaffe8458 <+4>: std r0,16(r1)
0x00003fffaffe845c <+8>: std r29,-24(r1)
0x00003fffaffe8460 <+12>: std r30,-16(r1)
0x00003fffaffe8464 <+16>: std r31,-8(r1)
0x00003fffaffe8468 <+20>: stdu r1,-352(r1)
0x00003fffaffe846c <+24>: mr r31,r1
=> 0x00003fffaffe8470 <+28>: ld r8,-28688(r13)
0x00003fffaffe8474 <+32>: std r8,312(r31)
0x00003fffaffe8478 <+36>: li r8,0
Reading the registries through variables makes gcc aware that they are
used, so it does not touch them. It has got no negative effect on
performance, as it produces the same object code as the current asm
block.
Change-Id: I3b99b0aa9944f9f33de9a42508e9d4dd23cec5e0
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx>
(and don't make use of it themselves), but many other files happen to depend on
it. Cleaned up some, but something like
grep -FwL sal/log.hxx $(git grep -Elw \
'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF') -- \*.cxx)
shows lots more files that potentially need fixing before the include can be
removed from rtl/string.hxx and rtl/ustring.hxx.
Change-Id: Ibf033363e83d37851776f392dc0b077381cd8b90
ie.
void f(void);
becomes
void f();
I used the following command to make the changes:
git grep -lP '\(\s*void\s*\)' -- *.cxx \
| xargs perl -pi -w -e 's/(\w+)\s*\(\s*void\s*\)/$1\(\)/g;'
and ran it for both .cxx and .hxx files.
Change-Id: I314a1b56e9c14d10726e32841736b0ad5eef8ddd
...when write+exec mmap fails (due to SELinux deny_execmem). This avoids the
tmp file creation in environments that don't need it and which in turn have
problems of their own with that tmp file business.
An alternative would be to first check whether SELinux deny_execmem is enforced
and only then try double mmap first. An advantage could be that it might avoid
false SELinux alerts in that case. The disadvantage would be the overhead of
introducing a conditional dependency on libselinux here. And given that for one
deny_execmem typically appears to be off by default (as at least both
contemporary GNOME desktop and OpenJDK malfunction when it is enabled), and for
another I guess deny_execmem could still change its value between the time of
checking for it and the time of requesting a write+exec mmap, that just does not
seem worth it.
Change-Id: I3560803139b630557b6219d3db52945c7e0cdcd2
as an experiment to see if that's somehow the cause of
NEXT An uncaught exception of type com.sun.star.sdbc.SQLException
NEXT - General error: java.lang.UnsatisfiedLinkError: com.sun.star.sdbcx.comp.hsqldb.StorageFileAccess.isStreamElement(Ljava/lang/String;Ljava/lang/String;)Z
NEXT ##Failure Location unknown## : Error
Test name: HSQLDBTest::testEmptyDBConnection
NEXT An uncaught exception of type com.sun.star.sdbc.SQLException
NEXT - General error: java.lang.UnsatisfiedLinkError: com.sun.star.sdbcx.comp.hsqldb.StorageFileAccess.isStreamElement(Ljava/lang/String;Ljava/lang/String;)Z
under clang
This reverts commit ce7f442bd0.
Change-Id: Ieed0be5721953b9644e4be411173e0ea73f33ed8
Using std::unordered_map causes a complex multi-line error message, call to
implicitly-deleted copy constructor of 'jni_uno::JNI_type_info_holder' etc.
Revert ce7f442bd0 for one source file.
Change-Id: I24453498d3fcaadf900f2bb56a2812f8bce55dd4
I had introduced it with d83de4b1a9 in
2012, when the C++/UNO bridge for 64-bit OS X was created mostly as a
copy of the Linux one.
Stephan says that the only need for USE_DOUBLE_MMAP should be on
SELinux anyway, so most likely also its use for the various BSDs and
Android are copypasta or cargo cult.
Change-Id: I1c16e830e5e8269b78b14837a9127a98612a6e54
Rewrite of 32-Bit-Code to work under 64 Bit:
To use the 32 Bit offset values in the ExceptionType we have to
allocate a single allocation block and use it for all code and data.
All offsets inside this area are guaranteed to be in 32 bit address
range. So we have to calc total memory allocation size for D-tor,
C-Tors, ExceptionType and type_info. ExceptionType is allocated via
placement new operator to locate everything inside our mem block.
There is one caveat: Struct type_info is kept in a map and was
referenced from class ExceptionType. Therefore type_info now is also
member of ExceptionType and can be referenced via 32 bit offset.
Change-Id: I6b524e36975a66fb64ca0cfb014c207053acec90
Reviewed-on: https://gerrit.libreoffice.org/13653
Reviewed-by: David Ostrovsky <david@ostrovsky.org>
Tested-by: David Ostrovsky <david@ostrovsky.org>