From: Sergey Bronnikov via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: Sergey Kaplun <skaplun@tarantool.org> Cc: tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH luajit] FFI: Workaround for platform dlerror() returning NULL. Date: Tue, 17 Sep 2024 09:31:29 +0300 [thread overview] Message-ID: <d6cfd645-62b1-4f2f-aadb-f6913771b24c@tarantool.org> (raw) In-Reply-To: <ZuRbFzwGcb1bkPW7@root> [-- Attachment #1: Type: text/plain, Size: 1912 bytes --] Hi, Sergey, On 13.09.2024 18:32, Sergey Kaplun wrote: > Hi, Sergey! > Thanks for the review! > > On 13.09.24, Sergey Bronnikov wrote: >> Hi, Sergey, >> >> thanks for the patch! LGTM with a minor comment below. >> >> On 13.09.2024 11:05, Sergey Kaplun wrote: >>> 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. >> 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.https://pubs.opengroup.org/onlinepubs/009695399/functions/dlerror.html > Updated the commit message to the following and force-pushed the branch: Thanks! LGTM > > | 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]:https://pubs.opengroup.org/onlinepubs/009695399/functions/dlerror.html > | > | Part of tarantool/tarantool#10199 > > >>> 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 >>> --- [-- Attachment #2: Type: text/html, Size: 3139 bytes --]
next prev parent reply other threads:[~2024-09-17 6:31 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-09-13 8:05 Sergey Kaplun via Tarantool-patches 2024-09-13 14:45 ` Sergey Bronnikov via Tarantool-patches 2024-09-13 15:32 ` Sergey Kaplun via Tarantool-patches 2024-09-17 6:31 ` Sergey Bronnikov via Tarantool-patches [this message] 2024-09-19 8:53 ` Maxim Kokryashkin via Tarantool-patches
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=d6cfd645-62b1-4f2f-aadb-f6913771b24c@tarantool.org \ --to=tarantool-patches@dev.tarantool.org \ --cc=sergeyb@tarantool.org \ --cc=skaplun@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH luajit] FFI: Workaround for platform dlerror() returning NULL.' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox