summaryrefslogtreecommitdiffstats
path: root/sal
Commit message (Collapse)AuthorAgeFilesLines
* -Werror=unused-parameterStephan Bergmann2017-02-101-0/+2
| | | | Change-Id: I63e466f8a1e2fbbf1b1bd84f491b37026909b1eb
* -Werror,-Wunused-macrosStephan Bergmann2017-02-091-7/+1
| | | | Change-Id: I06a6b6fa51fe437661610a4a678cd2d410bb1e4c
* Dummy implementations of backtrace/backtrace_symbols on Android, tooStephan Bergmann2017-02-091-1/+1
| | | | | | pt#2 Change-Id: I5cc280613879786bd723019d630edb5a920419b9
* Some clean upStephan Bergmann2017-02-091-21/+7
| | | | | | | | No more need to call sal_detail_log_report from sal_detail_log, now that it is called from SAL_DETAIL_LOG_STREAM since b3a11c8f4f307bbbb597c9c6e7e61ee93e794873 "tdf#91872: Make SAL_INFO and friends more efficient". Change-Id: Idb6cf7a4814abe29d5ba68591f39b4279267bc9b
* Fold sal_detail_log_backtrace into sal_detail_logStephan Bergmann2017-02-095-36/+37
| | | | | | | | | | ...the latter is LO-privately exported from sal, so it should be OK to add one more parameter to it. Change-Id: If6bf3458433aac2cc8b4e0cbd1602306051a777b Reviewed-on: https://gerrit.libreoffice.org/34080 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Dummy implementations of backtrace/backtrace_symbols on Android, tooStephan Bergmann2017-02-092-14/+14
| | | | Change-Id: Ibbab23a9332c3475ab6ce5654999f040e936acfb
* Proper -Werror,-Wunused-parameter fix for C codeStephan Bergmann2017-02-091-4/+8
| | | | Change-Id: I2ebd350c3c39f848f5a39fa120154dc449173434
* -Werror,-Wunused-parameterStephan Bergmann2017-02-091-4/+4
| | | | Change-Id: I1a52e05994d6a31aa5e65bc3357f48258fb6f049
* Implement SAL_DEBUG_BACKTRACE for LinuxStephan Bergmann2017-02-093-3/+62
| | | | | | | | | | ...by using glibc's backtrace_symbols(3). If this is ever implemented for other platforms, backtrace_symbols' interface may turn out to be awkward; but just use it directly for now. Also, the output from backtrace_symbols isn't too useful in itself, as for non-exported symbols it only prints soname+offset, but some addr2line postprocessing can turn that into something half-way decent. Change-Id: I58cc7912aa7d8031729fc116a82a409c1c16977a
* Solaris C++ 5.2 compiler is no longer relevantStephan Bergmann2017-02-081-6/+4
| | | | Change-Id: I520a58438e156661d3e01a899e97ee33d9f19102
* Clean up C-style interface nonsenseStephan Bergmann2017-02-074-19/+22
| | | | | | | Change-Id: Ie9a1e106f5270fd307d211fa334449c698acf25d Reviewed-on: https://gerrit.libreoffice.org/34010 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* loplugin:useuniqueptr (clang-cl)Stephan Bergmann2017-02-071-98/+84
| | | | Change-Id: Ic5daf83e77ebe4dcac1c6eba8e7dab1cc0368046
* TyposJulien Nabet2017-02-031-1/+1
| | | | | | | Change-Id: Ic54695e86b4b462419fa7d5ded7b1ddb19ee8ed5 Reviewed-on: https://gerrit.libreoffice.org/33904 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
* tdf#91872: Make SAL_INFO and friends more efficientArnold Dumas2017-02-032-81/+82
| | | | | | | Change-Id: I8a5b1665660b0679439f07d3924bb90cb4c4075c Reviewed-on: https://gerrit.libreoffice.org/33848 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:useuniqueptr extend to check local varsNoel Grandin2017-02-014-43/+27
| | | | | | | | | | | just the simple and obvious case for now, of a local var being allocated and deleted inside a single local block, and the delete happening at the end of the block Change-Id: I3a7a094da543debdcd2374737c2ecff91d644625 Reviewed-on: https://gerrit.libreoffice.org/33749 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Support signal handlers registered with SA_SIGINFOStephan Bergmann2017-02-011-48/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...as is the case for external/breakpad's google_breakpad::ExceptionHandler::SignalHandler (though that one appears to be careful to check that its additional arguments are not garbage, cf. the "Sometime, Breakpad runs inside a process where some other buggy code..." comment in workdir/UnpackedTarball/breakpad/src/client/linux/handler/exception_handler.cc). Seen when JunitTest_framework_complex run under ASan/UBSan happened to trigger an assert, > soffice.bin: vcl/source/app/dbggui.cxx:47: void ImplDbgTestSolarMutex(): Assertion `ImplGetSVData()->mpDefInst->CheckYieldMutex() && "SolarMutex not locked"' failed. > sal/osl/unx/signal.cxx:349:13: runtime error: call to function google_breakpad::ExceptionHandler::SignalHandler(int, siginfo_t*, void*) through pointer to incorrect function type 'void (*)(int)' > (instdir/program/libsofficeapp.so+0xb7eab0): note: google_breakpad::ExceptionHandler::SignalHandler(int, siginfo_t*, void*) defined here > #0 0x7f6cefc21693 in (anonymous namespace)::callSystemHandler(int) sal/osl/unx/signal.cxx:349:13 > #1 0x7f6cefc1f3e1 in (anonymous namespace)::signalHandlerFunction(int) sal/osl/unx/signal.cxx:422:9 > #2 0x7f6cedbc95bf (/lib64/libpthread.so.0+0x115bf) > #3 0x7f6ced20491e in __libc_signal_restore_set /usr/src/debug/glibc-2.24-33-ge9e69e4/signal/../sysdeps/unix/sysv/linux/nptl-signals.h:79 > #4 0x7f6ced20491e in __GI_raise /usr/src/debug/glibc-2.24-33-ge9e69e4/signal/../sysdeps/unix/sysv/linux/raise.c:55 > #5 0x7f6ced206519 in __GI_abort /usr/src/debug/glibc-2.24-33-ge9e69e4/stdlib/abort.c:89 > #6 0x7f6ced1fcda6 in __assert_fail_base /usr/src/debug/glibc-2.24-33-ge9e69e4/assert/assert.c:92 > #7 0x7f6ced1fce51 in __GI___assert_fail /usr/src/debug/glibc-2.24-33-ge9e69e4/assert/assert.c:101 > #8 0x7f6cb60cdad5 in ImplDbgTestSolarMutex() vcl/source/app/dbggui.cxx:47:5 > #9 0x7f6cbd337fb9 in DbgTestSolarMutex() tools/source/debug/debug.cxx:74:9 > #10 0x7f6cb3c98abf in vcl::Window::ReleaseGraphics(bool) vcl/source/window/window.cxx:900:5 ... Change-Id: I2625541e0b9e50f9723e61e0cbff0e6c77d0fb9f
* Work around GCC -Wunused-resultStephan Bergmann2017-01-311-1/+2
| | | | | | | | | | (cf. <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425> "(void) cast doesn't suppress __attribute__((warn_unused_result))"). Interestingly, this only occurs with GCC 7, look like <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70365> "warn_unused_result doesn't warn when the result is a class with a destructor" is fixed now. Change-Id: I7b4a066d0bf59080e47404d718917b5f38a98832
* sal: add SAL_NO_ASSERT_DIALOGS variable to redirect...Michael Stahl2017-01-271-0/+18
| | | | | | | ... the dialogs that pop up on assert() and abort() to stderr, which should work better in CI builds. Change-Id: I80ec95bae6cc21b8ac27f68ca93aa6c6cce707f4
* loplugin: unnecessary destructor oox..saxNoel Grandin2017-01-252-2/+0
| | | | | | | Change-Id: Ie12bfabc92bce04d702f3e77aa5896366e49245e Reviewed-on: https://gerrit.libreoffice.org/33509 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* coverity#1399029 silence Out-of-bounds readCaolán McNamara2017-01-222-5/+6
| | | | Change-Id: I025e416a6a162316d82cfbde9fbfcb0a45e888d5
* tweak high/low bit so we're always shifting with an unsigned numberCaolán McNamara2017-01-203-11/+9
| | | | Change-Id: Ic1c3f1f8aa6a16befb348652b0f5c3f82f47e0e7
* replace #ifdef SOLARIS with #ifdef __sunMichael Stahl2017-01-1718-43/+43
| | | | | | | Check for a macro that is defined by the compiler, we don't really need one defined by the build system. Change-Id: Iccb8e3198396881395c97a6b81690ebe64b7e9d2
* FreeBSD PPC: Missing patchPedro Giffuni2017-01-151-0/+9
| | | | | | | | Submitted by: Curtis Hamilton (cherry picked from commit 55ffac651c9996916680cdc05b32eb1b091a5ccf) Change-Id: I160ff9369a563d58469682ed96e25c792184708c
* loplugin:stringconstant: handle OStringBuffer::appendStephan Bergmann2017-01-113-17/+16
| | | | Change-Id: I283da52c0ee2b63c19e31e9a61ab24997c037a6a
* loplugin:externvar (clang-cl)Stephan Bergmann2017-01-118-13/+14
| | | | Change-Id: I81877e46cf95dcc7de16b797fca33658036bf9e8
* Some loplugin:conststringvar/stringconstant improvements: salStephan Bergmann2017-01-112-53/+53
| | | | Change-Id: I8b5d81c2b51f846a24fd1f7f9cdd831f1ea54ea5
* fix windows buildNoel Grandin2017-01-101-2/+3
| | | | | | | | | VS2013 does not like stack-allocated arrays with runtime size Change-Id: I58bd3a9feb6e2bef1b4a4f775669e5e3e03de5f7 Reviewed-on: https://gerrit.libreoffice.org/32922 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
* New loplugin:conststringvar: salStephan Bergmann2017-01-102-4/+4
| | | | Change-Id: Ia66415ff9ee67958e84cfff7eda082cdbfc9b9b9
* rename SAL_DEBUG_TRACE to SAL_DEBUG_BACKTRACENoel Grandin2017-01-105-14/+30
| | | | | | | | | | | since "trace" is such a generic term, this makes it easier to actually find the feature when you need it. And add feature to limit stack depth of the reported backtrace. Change-Id: Iab3e4ceb2e8480e7b5e2b920eb6c5d7631e21c43 Reviewed-on: https://gerrit.libreoffice.org/31752 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
* New loplugin:externvar: salStephan Bergmann2017-01-097-12/+35
| | | | Change-Id: Iefc33784f21e7a0b88c8d6308618926e38ab8554
* Replace side-effect--only uses of makeStringAndClear() with setLength(0)Stephan Bergmann2017-01-051-1/+1
| | | | Change-Id: Iaf8011f1bd6a10b324653899b7f51458f7d0b68a
* ofz#358 SJIS_84 table mnLeadEnd is out by oneCaolán McNamara2017-01-011-3/+3
| | | | | | | | | sjis 82 and 83 correctly denote the last index available while 84 reports one past the last available index 0x84BE is the last value to map, not 0x84BF Change-Id: Idcadc2d554ee59586f6e2f2775301fe69c94d55a
* cleanup tailing backslashesJochen Nitschke2016-12-304-5/+5
| | | | | | | Change-Id: Idb4bfc97e7d758c58118742affd9a9345c7a99f2 Reviewed-on: https://gerrit.libreoffice.org/32491 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* tdf#97283: Merge sal rtl tests to one makefileMatúš Kukan2016-12-2340-583/+68
| | | | | | | Change-Id: I1b78276e08feef9b6f49e5abe002391c50a8d2cc Reviewed-on: https://gerrit.libreoffice.org/32143 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Matúš Kukan <matus@libreoffice.org>
* tdf#97283: Merge sal osl tests to one makefileMatúš Kukan2016-12-2325-318/+46
| | | | | | | | | | Leave sal_osl_security alone because it does not use CPPUNIT_PLUGIN_IMPLEMENT. Change-Id: Iced8bb80c3ae661d371c087d7178a373ffd802e0 Reviewed-on: https://gerrit.libreoffice.org/32142 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Matúš Kukan <matus@libreoffice.org>
* Don't malloc between for and execStephan Bergmann2016-12-201-2/+0
| | | | | | | | | | ...at least macOS doesn't like that; change from OSL_TRACE (effectively doing nothing unless running a debug build with SAL_LOG=+INFO) to SAL_INFO (calling std::stringstream -> malloc in debug builds, regardless of SAL_LOG env var) in a005fbeddc4e615cfff56a9bd84355f8d42c1c8c "OSL_TRACE->SAL in framework..sal" made the mistake obvious. Change-Id: I43d35524a0861998a1ef58c6f448085a2fb01cd5
* keep salinit for non-DESKTOP but not for ANDROID/IOSCaolán McNamara2016-12-201-1/+1
| | | | Change-Id: I6b97345c9d927d1ae1d89f85611c2b5de7b5f0d4
* salinit for non-DESKTOP tooCaolán McNamara2016-12-201-1/+1
| | | | | | | Change-Id: Icb368b676199038bf8588b42ef50a2796468d185 Reviewed-on: https://gerrit.libreoffice.org/32228 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* bootstrap building with --disable-dynloading on standard linuxCaolán McNamara2016-12-201-1/+1
| | | | | | | Change-Id: I5baf70f0053612cba8b74f54aff11ce25cdeb95a Reviewed-on: https://gerrit.libreoffice.org/32202 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* add an option to pipe log output to fileMarkus Mohrhard2016-12-201-5/+18
| | | | | | | | | | The target file and the option are controlled by SAL_LOG_FILE. The variable should contain the target file in a system dependent notation. Change-Id: Ie1ce9c39740c8b7a989e5af222be21a3e3142084 Reviewed-on: https://gerrit.libreoffice.org/32176 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
* this textenc hack is for android and disable-dynamic-loadingCaolán McNamara2016-12-192-4/+11
| | | | | | | Change-Id: If2191161e82fc1e05b1442ae4b3b729cc1b8994d Reviewed-on: https://gerrit.libreoffice.org/32038 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* Make OUStringLiteral more usefulStephan Bergmann2016-12-171-0/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | ...by: * making the OUStringLiteral ctor non-explicit (to be exploited in a follow-up commit) * adding (LIBO_INTERNAL_ONLY) overloads to OUString/OUStringBuffer functions that can now take OUStringLiteral in addition to taking "real" string literals (Keeping the number of overloads smaller by replacing the ConstCharArrayDetector overloads with ones taking OUStringLiteral (for LIBO_INTERNAL_ONLY, at least) and relying on the now-implicit conversion from "real" string literals to OUStringLiteral unfortunately would not work: Both OUString and OUStringLiteral argubably need implicit conversions from "real" string literals, so any function overloaded for OUString and OUStringLiteral would be ambinguous when called with a "real" string literal. And removing the OUString ctor taking a "real" string literal and relying on an implicit conversion chain from "real" string literal to OUStringLiteral to OUString doesn't work because it would involve two user- provided conversions.) Change-Id: I14433fc1605b048807f60b3a3e14f92221d3a226 Reviewed-on: https://gerrit.libreoffice.org/32097 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
* -Werror,-Wstrict-prototypes (clang-cl)Stephan Bergmann2016-12-161-12/+12
| | | | | | | (sal/inc/rtllifecycle.h only hits on Windows as that is the only platform that happens to actually include it in a C compilation unit, sal/osl/w32/dllentry.c) Change-Id: I2878b52daf713ea45eaa2968cc5d2686b86abfe6
* Typo in meant-to-be-overloading function nameStephan Bergmann2016-12-161-1/+1
| | | | Change-Id: I65ab9176b39a436afce23e6bd4423ebf76219166
* teach sallogareas plugin to catch inconsistenciesNoel Grandin2016-12-152-7/+6
| | | | | | | Change-Id: I8bcea5ffc74d48148bea78da8c17744e288c069a Reviewed-on: https://gerrit.libreoffice.org/32004 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* I guess FREEBSD doesn't need this implementation of fcvtStephan Bergmann2016-12-141-47/+0
| | | | | | | | | | | The only actual use of fcvt across the codebase has been removed in 2002 with 31cb31335f3bf7e6e57d70ca61bf5a2a536d1e6e "GetStringFromDouble: replaced that fcvt() and temporary LocaleDataWrapper instance crap" even before this implementation for FREEBSD was introduce in 2003 with c61bf41c39daa97d30016eedcd7a0b687c2d8558 "INTEGRATION: CWS ooo11rc: join: from ooo11beta2". Change-Id: Ieea9499f001c6eac6383c344afb9050dfc70f43c
* Reuse existing sal.osl log areaStephan Bergmann2016-12-134-25/+25
| | | | Change-Id: Ib1fc80c79355322489b7ebd37cbbbbb6614ec67a
* fix windows build after OSL_TRACE->SAL changesNoel Grandin2016-12-131-3/+3
| | | | Change-Id: I345343f84f66299e8b91b31af0290ed0c622bf8d
* OSL_TRACE->SAL in avmedia..canvasNoel Grandin2016-12-131-3/+1
| | | | Change-Id: Id9077ea29e7028c12f40abfd4c57756c863e3cd9
* OSL_TRACE->SAL in framework..salNoel Grandin2016-12-134-177/+25
| | | | | | | Change-Id: I9a897af88aa9f6f7ca98ce521c69b5a4ee8462e9 Reviewed-on: https://gerrit.libreoffice.org/31903 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>