[Libreoffice-bugs] [Bug 137208] New: osl_getModuleURLFromAddress returns false if getcwd returns an error
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Fri Oct 2 14:30:37 UTC 2020
https://bugs.documentfoundation.org/show_bug.cgi?id=137208
Bug ID: 137208
Summary: osl_getModuleURLFromAddress returns false if getcwd
returns an error
Product: LibreOffice
Version: Inherited From OOo
Hardware: All
OS: Linux (All)
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: sdk
Assignee: libreoffice-bugs at lists.freedesktop.org
Reporter: marc-oliver.straub at advantest.com
We had a crash when bootstrapping UNO because someone removed the current
working directory.
Stacktrace:
SEGV
libuno_cppu.so.3(uno_getMapping+0x178)[0x7ffff43372c8]
libuno_cppuhelpergcc3.so.3(+0x64dea)[0x7ffff4bbadea]
libuno_cppuhelpergcc3.so.3(_ZN4cppu40defaultBootstrap_InitialComponentContextERKN3rtl8OUStringE+0x6f9)[0x7ffff4b993b9]
uno_getMapping crashed due to aFrom, aTo being nullptr, caused by
osl_getModuleURLFromAddress always returning false - so no module could be
loaded.
osl_getModuleURLFromAddress called osl_getProcessWorkingDir(workDir), which
returned a nullptr as workDir because the current working dir had been deleted.
This caused osl_getModureURLFromAddress to return false, even though the module
path (as returned by getModulePathFromAddress) was an absolute path.
To improve robustness against such (accidental) work directory removals, I
suggest osl_getModuleURLFromAddress to not check the current working directory
at all, but to delegate checking of the working dir to
osl_getAbsoluteFileURL(...), once the given path is detected to be a relative
path.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20201002/ed97b680/attachment.htm>
More information about the Libreoffice-bugs
mailing list