office-gobmx/comphelper
Stephan Bergmann b23b0452dd Check call to NSS_NoDB_Init for success
I had run into this when prior to 23245f723f
"external/nss: Fix rpath for Linux et al" that call had failed at least for my
Linux ASan+UBSan build, causing UITest_calc_tests to fail with

> ../../lib/cryptohi/sechash.c:443:16: runtime error: member access within null pointer of type 'HASHContext' (aka 'struct HASHContextStr')
>  #0 in HASH_Begin at workdir/UnpackedTarball/nss/nss/out/Debug/../../lib/cryptohi/sechash.c:443:16 (instdir/program/libnss3.so +0x3c47eb)
>  #1 in comphelper::HashImpl::HashImpl(comphelper::HashType) at comphelper/source/misc/hash.cxx:78:9 (instdir/program/libcomphelper.so +0x149945a)
>  #2 in comphelper::Hash::Hash(comphelper::HashType) at comphelper/source/misc/hash.cxx:96:16 (instdir/program/libcomphelper.so +0x1496eb7)
>  #3 in vcl::PDFWriterImpl::PDFWriterImpl(vcl::PDFWriter::PDFWriterContext const&, com::sun::uno::Reference<com::sun:🫘:XMaterialHolder> const&, vcl::PDFWriter&) at vcl/source/gdi/pdfwriter_impl.cxx:1137:9 (instdir/program/libvcllo.so +0x8f20d3c)

because that HASH functionality was used even though initializing it had failed.

Throwing a RuntimeException appears to be effective, even though conceptually
not the best approach: at least doing "Export Directly as PDF" of a fresh Writer
document fails cleanly with an error box "Error saving the document Untitled 1:
General Error. General input/output error."

Change-Id: I07564a7f27a7b44e535556032e0eeb267026f06d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91088
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-03-26 10:44:24 +01:00
..
inc/pch Drop o3tl::optional wrapper 2020-02-21 14:50:28 +01:00
qa Drop o3tl::optional wrapper 2020-02-21 14:50:28 +01:00
source Check call to NSS_NoDB_Init for success 2020-03-26 10:44:24 +01:00
util
CppunitTest_comphelper_ifcontainer.mk
CppunitTest_comphelper_parallelsort_test.mk
CppunitTest_comphelper_syntaxhighlight_test.mk
CppunitTest_comphelper_test.mk
CppunitTest_comphelper_threadpool_test.mk
CppunitTest_comphelper_variadictemplates_test.mk
IwyuFilter_comphelper.yaml
JunitTest_comphelper_complex.mk
Library_comphelper.mk make isDebuggerAttached() public comphelper API 2020-02-07 09:11:45 +01:00
Makefile
Module_comphelper.mk
README
StaticLibrary_windows_process.mk

Helper functionality for implementing UNO components

...anything not generic/mature enough to end up in URE's stable interface at
cppuhelper etc.