Age | Commit message (Collapse) | Author |
|
...that don't even depend on program-defined types
Change-Id: I102ce7e97280e7b80f8270ab3b7bbdc111d4d68c
Reviewed-on: https://gerrit.libreoffice.org/78168
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I300d14d580d450ec338129918955651b9d40d5d2
Reviewed-on: https://gerrit.libreoffice.org/78059
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ib61f500f7f9199e524d6ba4de419eda7fb30abcf
Reviewed-on: https://gerrit.libreoffice.org/77761
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I5db25074d42fa22f3e36969cb561ad64c1e96dc1
Reviewed-on: https://gerrit.libreoffice.org/77760
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Triggering those SAL_WARN sporadically caused deadlocks at least for
<https://ci.libreoffice.org/job/lo_ubsan/>.
Change-Id: I7b7037e411c29eea26e63f71a5679127b084f447
Reviewed-on: https://gerrit.libreoffice.org/77374
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
This is a partial revert of 17642437fe0d68cf868ab430f04b4fdc12f1767f "reduce
ifdef forest". The original code used unsetenv only for certain platforms, and
putenv for others, but code a few lines further down uses unsetenv
unconditionally, so assume that it is safe to use on all relevant platforms
these days.
unsetenv isn't listed as async-signal-safe at <http://pubs.opengroup.org/
onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04_03> "Signal Actions"
(but is already used a few lines further down, also between fork and exec), but
at least we get rid of the memory management involved in the OUString instance.
Change-Id: Iac993db8819d40a0841c455ed04ff9ca2ee2e4eb
Reviewed-on: https://gerrit.libreoffice.org/77368
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I8b9d8f80bbf3d7d9c060d2da4675ae832966c085
Reviewed-on: https://gerrit.libreoffice.org/77242
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Icb9d9e1cd21e2506e36fe40a3b93b6a2521a868c
Reviewed-on: https://gerrit.libreoffice.org/77239
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
so drop the first write in favor of the second
Change-Id: Iac906d806a66e010e8352139b555aef6078bda02
Reviewed-on: https://gerrit.libreoffice.org/77235
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
doubleToString() is entered with an inaccuracy afflicted
fValue=-9999.9999999999927 for which the rounding into the next
magnitude incremented the '-' character to '.' instead of
appending a '1' (and '0' and then "000") thus yielded ".0000"
instead of "-10000"
This seems to have been always the case.
Change-Id: I66170defa71fec40ca0b85f68affde8eff0d5ccb
Reviewed-on: https://gerrit.libreoffice.org/77208
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
|
|
Change-Id: Ie32bb0cf7f987ab57dc03d1485535a1019fd111a
Reviewed-on: https://gerrit.libreoffice.org/76853
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
|
|
Change-Id: Ie183c445bf8a545f59aac7b0e29f72ab679a6cf3
Reviewed-on: https://gerrit.libreoffice.org/76852
Tested-by: Jenkins
Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
|
|
after commit bf6bde2da134dad60ecbf8f3e97674abadb7349e
Change-Id: Iaf6f1457f95e5b821879b735c16a692cca7515db
Reviewed-on: https://gerrit.libreoffice.org/76791
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Static initializers were used for the environment strings since
commit d19c40f45dc8e8bcd9db4c6b83bdcf6367f6fbe7 to workaround
thread-unsafe getenv. The special case for Android was initially
introduced in commit 60628799633ffde502cb105b98d3f254f93115aa,
to allow modifying the environment in the code; then was fixed
in commit 4fbf6df784529d48cf194a2d9c495ffb47933d59. That was
relying on the functions being called each time their results
were used. But commit 9f027559557cb132835d8a13cdc0281ad4e757ae
changed that, making the results static, thus only calling the
functions once on all platforms.
This was effective more than a year already, so presumably the
special-casing for Android isn't needed anymore. Thus, this patch
unifies all platforms to use the same approach (calling getenv
once, storing copies of result in static variables.
Also this stores flags used in maybeOutputTimestamp to static
variables, too, to avoid parsing strings each time the function
is called.
Change-Id: I84bdbfb900c15b407fb555296d2613bd3d62da7e
Reviewed-on: https://gerrit.libreoffice.org/76573
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: I61e7a28c5beab8f0c619767545009cefae6ddcd9
Reviewed-on: https://gerrit.libreoffice.org/76772
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: Id9d994343d10b5d5e852b10946c036dfbeb66d04
Reviewed-on: https://gerrit.libreoffice.org/76656
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
It passed "make check"
Change-Id: I50c3639ec258c7fb6d73104f8e777f96995aa8e3
Reviewed-on: https://gerrit.libreoffice.org/76543
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
"an URI", to complete:
https://gerrit.libreoffice.org/#/c/75985/
Change-Id: I57489b05117fd12ae6aa22544437ab5bc6b5154f
Reviewed-on: https://gerrit.libreoffice.org/76037
Tested-by: Jenkins
Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
|
|
Change-Id: I0ff36c58bf2448bdccc239582ba24b69c7431c6d
Reviewed-on: https://gerrit.libreoffice.org/75921
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Let us see what happens if we annotate our mutex code,
https://scan.coverity.com/models
Change-Id: I7baf44d1a252f19b4ae47f3a6b318f7ccd9629d7
Reviewed-on: https://gerrit.libreoffice.org/75851
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Id1b8044126e65e67b2496cf7a4eb86b54ba6c1df
Reviewed-on: https://gerrit.libreoffice.org/75872
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Make OffTime static const; don't cast from FILETIME to __int64 (see
https://docs.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-filetime
for explanation: "it can cause alignment faults on 64-bit Windows").
Instead, cast in opposite direction: from 8-byte-aligned 64-bit integer
to FILETIME.
Change-Id: Iba61cc0198f8f25ef471d87e661c8801724b913d
Reviewed-on: https://gerrit.libreoffice.org/75256
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: If863d28c6db470faa0d22273020888d4219e069e
Reviewed-on: https://gerrit.libreoffice.org/74559
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
With the wrong type, we were measuring the sizeof() wrongly, leading to
a hard to catch crash at start that appeared only from time to time.
Improve the concatenation too when at that.
Change-Id: I4a4ab2909124281aac99118d66c62d669294d5f7
Reviewed-on: https://gerrit.libreoffice.org/74375
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/74444
Tested-by: Jenkins
|
|
WPXSvInputStreamImpl was hammering on getFilePos pretty hard, and
getFilePos uses a mutex, which is slow when it is called from every
single read. So switch to using std::atomic to access position.
This is specifically fixing the performance of queryTypeByDescriptor
when called from a basic macro on a local test file.
This takes my test macro from 8s to 4s.
Change-Id: Iab707a374359e2ee0e92425b2d9a903d67cb53d4
Reviewed-on: https://gerrit.libreoffice.org/73377
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
getpwuid_r() returns nullptr. Oddly enough, it does work on actual
iOS, though. So use hand-crafted values that match behaviour on actual
iOS.
Change-Id: Idcc95d330a93495938520229e039f340876c3653
|
|
Change-Id: I4894023e42cbfa32916ee3ddfb2cfb5426cfc69f
Reviewed-on: https://gerrit.libreoffice.org/72195
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
not before vowels with a consonant sound so its a url not an url
Change-Id: Ic27ff3bee67469284d460c31ced6f63cb3633db2
Reviewed-on: https://gerrit.libreoffice.org/72062
Reviewed-by: Jens Carl <j.carl43@gmx.de>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Plus some build fixes triggered by this.
Change-Id: I59b21def706598ceffd45ae5b1f0262ec9c1ad50
Reviewed-on: https://gerrit.libreoffice.org/71581
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
to find more places we can elide the OUString() constructor at call
sites
Change-Id: Ie09f3c61f2c4b4959c97dc98ebcbaf7c51d5d713
Reviewed-on: https://gerrit.libreoffice.org/71514
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
V595 The 'ustrFile' pointer was utilized before it was verified against nullptr.
Check lines: 83, 107.
Change-Id: I874983508fb805b1f0a55b3a5b6d4d78ae1babdb
Reviewed-on: https://gerrit.libreoffice.org/71472
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Building against libstdc++ effectively always requires -pthread anyway (as
various standard C++ headers require it, see the comment added to
solenv/gbuild/platform/unxgcc.mk), so many explicit uses of -pthread/-lpthread
can be removed.
Doing a (partial) test build on Linux with Clang -stdlib=libc++ suggests that
libc++ indeed doesn't need -pthread as libstdc++ does.
The remaining uses of -pthread/-lpthread are mostly in configure.ac for the
various BSDs (which somebody else might want to clean up now), and related to
external projects. I tried to be careful to remove -pthread/-lpthread from
makefiles only when C++ object files are involved (so -pthread will now be
included on the link command line by default).
Change-Id: I936e082839cb9a434bd273ce5a1f187a4245dfa1
Reviewed-on: https://gerrit.libreoffice.org/71291
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
macosx_getLocale (via getProcessLocale, both sal/osl/unx/osxlocale.cxx) obtains
from the system a locale string like "en-DE". (Whether that is even a sane and
recommended way to obtain the system locale on macOS I don't know; but lets
leave it at that for now.)
However, setting a locale env var (LANG, LC_ALL) to such a value causes a
constructor call std::locale("") to throw a std::runtime_error
"collate_byname<char>::collate_byname failed to construct for ", at least on
macOS 10.14.4. And libdivvun (which might be bundled with a LO extension) is
known to be hit by that, see <https://github.com/divvun/libdivvun/issues/28>
"locale("") gives 'collate_byname<char>::collate_byname failed to construct
for ' on LO on mac".
The code setting LC_ALL/LC_CTYPE/LANG was there ever since
8737d1831b48acd8a4793c4728ad8563f77b5bf8 "INTEGRATION:
CWS geordi2q14: #111934#: merge CWS ooo111fix2", but for unclear reasons. Lets
assume that it had no purpose (any longer).
Change-Id: I0b519ad567a713d61f662aa984791db1a91c708c
Reviewed-on: https://gerrit.libreoffice.org/70918
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
... use GetModuleFileNameW() for that.
We call SetDllDirectoryW and SetSearchPathMode to improve security of
the process, and exclude some paths (including current directory) from
search when using API that looks for binaries whose names are not fully
qualified.
So the sequence is this:
1. Program is started using relative executable path like
"instdir\program\soffice";
2. sal_detail_initialize is called, which calls the two mentioned
hardening functions;
3. sal_detail_initialize calls osl_setCommandArgs, which in turn calls
osl_createCommandArgs_Impl;
4. The latter uses SearchPathW with empty path and first program arg
"instdir\program\soffice" to find fully qualified program path.
That now naturally fails, because current path is not searched.
But to find the process name, we need no search: we can simply use
GetModuleFileNameW() with NULL passed as module handle. Let's use that.
Note that we can't use _wpgmptr/_get_wpgmptr, because we don't use wide
entry point like wmain.
Change-Id: I7a0013a0505f7bdd38164b09b045bfade9686664
Reviewed-on: https://gerrit.libreoffice.org/70844
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
to find stuff like
OUString s = OUString("xxx")
Change-Id: Ie7ed074c1ae012734c67a2a89c564c1900a4ab04
Reviewed-on: https://gerrit.libreoffice.org/70697
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I7bd1511a6acc105ab5b42c698c7578cfb9ce06b4
Reviewed-on: https://gerrit.libreoffice.org/70708
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I7d85cbc9105c5e0c4a8d9a69c4ac9d6dfc07eabd
Reviewed-on: https://gerrit.libreoffice.org/70663
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Not to break the 'old' Android app, introduce a bool that can indicate
if we are using the LOK from the 'old' (LOK-via-JNI-based) or from the
'new' (loolwsd-based) app.
Change-Id: I38bd665cc1d5bc88018574171443ecabc46763df
Reviewed-on: https://gerrit.libreoffice.org/70678
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
|
|
We don't need the dynamic load complexity for these now with baseline
Windows version being Windows 7 SP1. Stuff used only for compatibility
with older versions was dumped.
Change-Id: I810f271796cfd875cfa18a3081c9ad444fe57b3e
Reviewed-on: https://gerrit.libreoffice.org/70321
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
to be declared as const. However, on platforms not excluded by
NO_PTHREAD_PRIORITY, osl_thread_priority_init_Impl() then tries
later to assign values to these. This leads to compiler errors
on platforms so affected, including FreeBSD. Revert as necessary
on affected platforms, also using NO_PTHREAD_PRIORITY to match
the code in osl_thread_priority_init_Impl().
Change-Id: I0e968231e7c1be9771844222a7bab1f0fcb51a0e
Reviewed-on: https://gerrit.libreoffice.org/69603
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
V522 There might be dereferencing of a potential null pointer.
Change-Id: Ie617b41a8f8d334022cf5313b242a236baedba48
Reviewed-on: https://gerrit.libreoffice.org/70017
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
V575 The potential null pointer is passed into 'foo' function
Add asserts to those cases that are related to OOM cases. There's
nothing to be done if the assertions fail anyway.
Change-Id: I92ac95d44f512aa1948b1552b0e1f6da695a9f92
Reviewed-on: https://gerrit.libreoffice.org/70008
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: Ica146899a5557732babf4e07b20b9e3d32426c6e
Reviewed-on: https://gerrit.libreoffice.org/69824
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
|
|
Change-Id: I07604028845c49cc084927e21db7f21c5d053bab
Reviewed-on: https://gerrit.libreoffice.org/69796
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
The gethostbyname*() functions are obsolete.
Change-Id: I14a55eba3f111a3280f23955ffd86843079c7e75
Reviewed-on: https://gerrit.libreoffice.org/69337
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
#0 0x00007f8dc781e4dc in __lll_lock_wait () from /lib64/libpthread.so.0
#1 0x00007f8dc781a1b8 in _L_lock_820 () from /lib64/libpthread.so.0
#2 0x00007f8dc781a088 in pthread_mutex_lock () from /lib64/libpthread.so.0
#3 0x00007f8dc81d57d1 in lookupThreadId (hThread=140246229497600) at sal/osl/unx/thread.cxx:585
#4 0x00007f8dc81d5aa4 in osl_getThreadIdentifier (Thread=0x0) at sal/osl/unx/thread.cxx:701
#5 0x00007f8dc8173fa0 in osl::Thread::getCurrentIdentifier () at include/osl/thread.hxx:138
#6 0x00007f8dc81736ba in sal_detail_log (level=SAL_DETAIL_LOG_LEVEL_WARN, area=0x7f8dc81f2e53 "sal.osl",
where=0x7f8dc81f3130 "sal/osl/unx/process.cxx:238: ", message=0x5bd5b90 "Failed to exec: ENOENT", backtraceDepth=0)
at sal/osl/all/log.cxx:279
#7 0x00007f8dc816d166 in sal::detail::log (level=SAL_DETAIL_LOG_LEVEL_WARN, area=0x7f8dc81f2e53 "sal.osl",
where=0x7f8dc81f3130 "sal/osl/unx/process.cxx:238: ", stream=..., backtraceDepth=0)
at include/sal/log.hxx:50
#8 0x00007f8dc81c1ddc in ChildStatusProc (pData=0x7f8d9e302a90) at sal/osl/unx/process.cxx:238
#9 0x00007f8dc81d49a6 in osl_thread_start_Impl (pData=0x6757780) at sal/osl/unx/thread.cxx:235
#10 0x00007f8dc7817f6b in start_thread () from /lib64/libpthread.so.0
#11 0x00007f8dc7b227ed in clone () from /lib64/libc.so.6
Change-Id: I611cf907f89c7a1d8cdc3a9c42f449e8daaa2614
Reviewed-on: https://gerrit.libreoffice.org/69363
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Explanation of the patch: in the Windows version of LibreOffice,
when calling the basic Shell(...) function (located in
basic/source/runtime/methods.cxx), a function is_batch_file()
is called in turn, to check if the program file path to execute
is a batch or an executable.
The function is_batch_file() is located in sal/osl/w32/procimpl.cxx
and simply checks if the file extension is equal to bat (or cmd or
btm).
This works as expected, except when the file path contains space
characters. In that case, the file path is *quoted* before the
call to is_batch_file() and for a batch file the file extension
becomes bat" (note the quote) instead of bat, and thus the call
to is_batch_file() wrongly returns false in that case.
In this patch, the issue is fixed by changing the function
get_file_extension() to make it return the correct extension
(i.e. without the '"' character) when the file name is quoted.
Change-Id: Ib6e74da87b23d64db925c17f8a26617f1a86a83d
Reviewed-on: https://gerrit.libreoffice.org/69230
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Ic37967dedb2378106db2f3f437781c8ad20cad56
|
|
Change-Id: Ic9fd97a2ff8a6d96ffcc7ad300ef30201d786528
Reviewed-on: https://gerrit.libreoffice.org/67876
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
|
|
Change-Id: I433376dfea0a43c63827ba15308a614f3466fb71
Reviewed-on: https://gerrit.libreoffice.org/67875
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
|