Age | Commit message (Collapse) | Author |
|
Anything except an unset G_SLICE or the value always-malloc results in
the custom allocator. We might revert that change if it causes issues
but currentlz it looks like our custom allocator performs quite badly in
some situations.
Change-Id: Ib867f7ba0de4d599aa045c28aaab9b644d619beb
|
|
regression from
commit 91457fb326dda7bd1fc6d9e1b3afe0667425121c
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date: Tue Apr 21 20:55:15 2015 -0500
use osl_get_system_random data in rtlRamdomPool
Change-Id: Ib5ff6b7fbd08869d9a6dbc1f4df883d701cf765c
|
|
Change-Id: If877cd61000fe6b82083a9fff79c25364d49e721
|
|
substitute as much as possible getting directly random data
from the system rather than mixing our own pseudo-random numbers
Fall back on the home-grown method if for some reason
system random does not work.
(on windows rand_s() is said to be able to return errors,
beyond EINVAL, but they are just not listed.. so who knows)
Change-Id: I71e88e097a9f3587086a710e9a785d61c560785e
Reviewed-on: https://gerrit.libreoffice.org/15474
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
|
|
lcov over make check showed
98 4699997 : sal_Int32 rtl_ustr_indexOfAscii_WithLength(
99 : sal_Unicode const * str, sal_Int32 len,
100 : char const * subStr, sal_Int32 subLen) SAL_THROW_EXTERN_C()
101 : {
102 4699997 : assert(len >= 0);
103 4699997 : assert(subLen >= 0);
104 4699997 : if (subLen > 0 && subLen <= len) {
105 : sal_Int32 i;
106 54014537 : for (i = 0; i <= len - subLen; ++i) {
107 51036513 : if (rtl_ustr_asciil_reverseEquals_WithLength(
108 51036523 : str + i, subStr, subLen))
109 : {
110 205482 : return i;
111 : }
112 : }
113 : }
114 4494505 : return -1;
115 : }
so
1/ in 95% of the cases the result is not-found.. _that_ is the hot path
2/ we are calling rtl_ustr_asciil_reverseEquals_WithLength close to 11 times
per call.. (average ~ len - subLen, due to the high miss ratio)
so let's first search for the first byte of the substring
to optimize the 'miss' case, which is the most common one.
Change-Id: I20ef0821db2ff0db5935dd562844a947a14aff64
Reviewed-on: https://gerrit.libreoffice.org/16763
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...from most rtl/bootstrap.h functions. They are effectively only called from
C++ code (there is no plain C UNO binding), so it should be fine to let std
exceptions (like bad_alloc or length_error) propagate from their implementations
to call sites.
(The exception is rtl_bootstrap_args_close, which is typically called from C++
dtors, so should not throw anyway.)
This would strictly speaking be an [API CHANGE], but it should make no practical
difference whether a process terminates abruptly because an exception cannot
pass through a SAL_THROW_EXTERN_C() nothrow specification or because legacy
client code does not expect exceptions to be thrown from functions from which
SAL_THROW_EXTERN_C() has now been removed.
Change-Id: I08e8479e9c5731e46021aadd6a725c1793024d10
|
|
Change-Id: Ia304622214c47d35387dd0393db8e9afa55118f2
|
|
Change-Id: Ib34196185f90204a71598f2c659c3fddce7a0e4d
|
|
Change-Id: I745b09d8a248f08afdd3387f4cfcf69d71ec3c39
|
|
Change-Id: I5f525d91ce24d1d2653a6855f1c4fffc039ae398
|
|
Change-Id: Ibd373cddb1e25f05528e627349953b5f7d115330
|
|
Change-Id: If1f852ce4ef3419d663d4e2f4bdb4a57cc61e799
|
|
...where in C++ memchr does not have exactly the two overloads
void const * memchr(void const *, int, size_t)
void * memchr(void *, int, size_t)
but rather the C
void * memchr(void const *, int, size_t)
shining through (see bugreport.apple.com issue 21128245 "non-conforming memchr
in C++"), which gets in the way of the upcoming improved redundant const_cast
check in loplugin:redundantcast.
Change-Id: I7001e74e03429ef23682d52da28fca435130d775
|
|
Change-Id: Iec781bdbbf216cb14c9ba5be5955123273d7699c
|
|
Change-Id: I9fad024e4b5c8a4ca272f2387df07351198cf5dc
|
|
found with
git grep -E '\* *\<reinterpret_cast\>[^>]+\<OUString\>'
Change-Id: I9306d4ad8e3b1664f54cb7df86f2d79bfd3c6cb9
|
|
Change-Id: I6c405287266572598a86b534552ed2f7bdff7fa2
|
|
Change-Id: Id28046eb318cd3b2ed0b813fd266617547cf6ee2
|
|
Change-Id: Ic03728b2824eb59b9b6351a88ec355bfb93154cb
|
|
Change-Id: I5e370445affbcd32b05588111f74590bf24f39d6
|
|
Change-Id: I03e43d219a65aa270f73a91896e0e7a567d424bc
|
|
Change-Id: I70330b1f4844f33779f814377afaf90e0a219b1d
|
|
Change-Id: Ifc03631b126ec19cb98cb42a258ca4880e868385
|
|
Create 4 new formats enums rtl_math_StringFormat:
rtl_math_StringFormat_E1, rtl_math_StringFormat_E2,
rtl_math_StringFormat_G1, rtl_math_StringFormat_G2
to 1 or 2 digits in exponent for scientific notation.
Set General format to use rtl_math_StringFormat_E2.
Set trendline equation in status bar to use rtl_math_StringFormat_E1
Change-Id: I41466a6d4ba808ba5b9b38ba252b37c6b4560f12
Reviewed-on: https://gerrit.libreoffice.org/14562
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
|
|
found with
$ git grep -lP 'return\s*\(\s*\w+\s*\)\s*;'
Change-Id: Ic51606877a9edcadeb647c5bf17bc928b69ab60e
|
|
This was unused since the earlier cleanup.
Change-Id: Ia56641c4242037a0ce501e43939b8dc862499f0e
|
|
Change-Id: I6e48e2593f93efd71e84a076a99457c3daf7d9e0
|
|
Change-Id: I0eccec058f506be69f6c95a1a6d97be64cb734bc
|
|
Change-Id: Ie9a37e7eb837abf0d2783a9a0f8c2b33a6772d33
|
|
...regression introduced with b0ef5cf258f3a84054c052f0a09a208dbc17fdf3 "sal: add
some argument checking assertions for strings and buffers" not being aware of
186990395d72a803dd4a9f087fe4e05f49e69ad2 "Clean up Mac _imp_getProcessLocale:
Introduces OUStringBuffer::appendUninitialized."
Change-Id: I828d98eb52f57f4e39e71ded39ef034e1788f4d1
|
|
Also remove some now redundant asserts from headers.
Some of these actually trigger on unit tests so are commented out.
Change-Id: I07c6b2b2bd175361691a141f22eec584e3ab8f0b
|
|
and we can include a few less headers
Change-Id: Id742849ff4c1c37a2b861aa3d6ab823f00ea87f8
|
|
Change-Id: I13058a46526a1186deaa8fffde303c272c0cc8aa
|
|
Change-Id: Ie54d340478412e62b87d66e287fd8a3963e97898
|
|
...as e.g. the read+write+exec arena used in
bridges/source/cpp_uno/shared/vtablefactory.cxx has specific requirements on
obtained memory. This broke recent 8b9968a26265facaf5e761485d750ce9cedab3ab
"fdo#72755: Only use double mmap as fallback" for e.g. --enable-ooenv (which
sets G_SLICE). This is a partial revert of
ce906b8096081dee15dc8cc96e570d5b0b587955 "skip tricky allocators on
G_SLICE=always-malloc."
Change-Id: I5a5fb7c3c920a7856381e6c55638137c625b5111
|
|
Change-Id: I0ad9681a8b31d78cefce5b66040415154a1c7a99
|
|
Change-Id: Ifd23373b1ac4919793d1b4251ed90cf2dd6f2bda
|
|
Change-Id: I2a059f9332215678936d78990ee36a5ae2161712
|
|
So let's let this for Windows only
Change-Id: I1f76e03b0e3431a6954a75f5cb247ef1a1644a28
|
|
|
|
Change-Id: I28438000c2b0a8e6ce4f5640f861f572c0cb83c8
|
|
breaks windows build otherwise (fatal erro C1017)
Change-Id: Idae78c621bfb8f989eb33220f015e17a7b7fb92f
|
|
...and there is no reason for such a precond for rtl_string_newFromLiteral
Change-Id: I27f7217c8db17cef860c37886d0f7e561dc852f8
|
|
Change-Id: I9793f697f14118340bc6db89540fe50ad0b8ccbd
|
|
This addresses some cppcheck warnings.
Change-Id: Id5f90757571e76a2c05a4cbd37020e1f6a6b2033
Reviewed-on: https://gerrit.libreoffice.org/13544
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
|
|
This feature had never been documented in include/rtl/bootstrap.h and had only
been used internally in LO on Windows for the multi-layer installations (thus is
unused since 827430c8c0417396b3c1d2a049ccddb818c89646 "Fold URE: Windows"), so
it should not hurt to remove it even if it could be considered part of the
stable URE interface.
Change-Id: If0f59f30dad8b2c3ff5f7931c19cd254073ccf80
|
|
After 2ad716f406e0fdb9b9294876c64ae92fecbf5e27 "Revert 'pyuno: set up fake
command line in getComponentContext(),'" e.g. PythonTest_sw_python would fail on
Windows, where WinSalGraphics::GetDevFontList (vcl/win/source/gdi/salgdi3.cxx)
calls osl_getExecutableFile and is itself called in a python process where
osl_setCommandArgs has not been set up.
This patch makes osl_getExecutableFile on all platforms if osl_setCommandArgs
has not (yet) been set fall back to the code that was
osl_bootstrap_getExecutableFile_Impl (which was called from
sal/rtl/bootstrap.cxx, which can now call osl_getExecutableFile).
Change-Id: I6c1bb59205041b3208c830a8b8406e28128b4566
|
|
Change-Id: Idf514941f4bb05834d8ac0d7bafbe86e34377611
|
|
...corresponding to the OUStringBuffer couterpart
Change-Id: I3ab03343696e6755cf1ccc470e4decc2f41d2558
|
|
Change-Id: I482e6eeca09e7b15a8d95a866ebab35d06f13e9e
|