<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - osl_getModuleURLFromAddress returns false if getcwd returns an error"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=137208">137208</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>osl_getModuleURLFromAddress returns false if getcwd returns an error
</td>
</tr>
<tr>
<th>Product</th>
<td>LibreOffice
</td>
</tr>
<tr>
<th>Version</th>
<td>Inherited From OOo
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux (All)
</td>
</tr>
<tr>
<th>Status</th>
<td>UNCONFIRMED
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>sdk
</td>
</tr>
<tr>
<th>Assignee</th>
<td>libreoffice-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>marc-oliver.straub@advantest.com
</td>
</tr></table>
<p>
<div>
<pre>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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>