<!DOCTYPE html>
<html data-lt-installed="true">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body style="padding-bottom: 1px;">
<p>Hi, Sergey,<br>
</p>
<div class="moz-cite-prefix">On 13.09.2024 18:32, Sergey Kaplun
wrote:<br>
</div>
<blockquote type="cite" cite="mid:ZuRbFzwGcb1bkPW7@root">
<pre class="moz-quote-pre" wrap="">Hi, Sergey!
Thanks for the review!
On 13.09.24, Sergey Bronnikov wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">Hi, Sergey,
thanks for the patch! LGTM with a minor comment below.
On 13.09.2024 11:05, Sergey Kaplun wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">From: Mike Pall <mike>
Contributed by mcclure.
(cherry picked from commit 478bcfe52a653bf338f17690147fa9f5793f5b42)
The `ffi.load()` implementation assumes the string returned from
`dlerror()` is non-NULL and immediately dereferences it. This may lead
to a crash on some platforms like Android (Oculus Quest) where it is
possible.
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
According to a POSIX standard, it is not Android-specific behaviour [1]:
> If no dynamic linking errors have occurred since the last invocation
of /dlerror/(), /dlerror/() shall return NULL.
1. <a class="moz-txt-link-freetext" href="https://pubs.opengroup.org/onlinepubs/009695399/functions/dlerror.html">https://pubs.opengroup.org/onlinepubs/009695399/functions/dlerror.html</a>
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
Updated the commit message to the following and force-pushed the branch:</pre>
</blockquote>
Thanks! LGTM<br>
<blockquote type="cite" cite="mid:ZuRbFzwGcb1bkPW7@root">
<pre class="moz-quote-pre" wrap="">
| FFI: Workaround for platform dlerror() returning NULL.
|
| Contributed by mcclure.
|
| (cherry picked from commit 478bcfe52a653bf338f17690147fa9f5793f5b42)
|
| The `ffi.load()` implementation assumes the string returned from
| `dlerror()` is non-NULL and immediately dereferences it. This may lead
| to a crash on POSIX platforms [1] where it is possible.
|
| This patch adds the corresponding check and the default "dlopen failed"
| error message.
|
| Sergey Kaplun:
| * added the description and the test for the problem
|
| [1]: <a class="moz-txt-link-freetext" href="https://pubs.opengroup.org/onlinepubs/009695399/functions/dlerror.html">https://pubs.opengroup.org/onlinepubs/009695399/functions/dlerror.html</a>
|
| Part of tarantool/tarantool#10199
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">
This patch adds the corresponding check and the default "dlopen failed"
error message.
Sergey Kaplun:
* added the description and the test for the problem
Part of tarantool/tarantool#10199
---
</pre>
</blockquote>
</blockquote>
<pre class="moz-quote-pre" wrap="">
</pre>
</blockquote>
</body>
<lt-container></lt-container>
</html>