[php-src] PR #11094: Add zend.dlopen_deepbind php.ini directive
| From: | cgzones | Date: | Mon, 17 Apr 2023 15:44:23 +0000 |
| Subject: | [php-src] PR #11094: Add zend.dlopen_deepbind php.ini directive | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-22344@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/11094
Author: cgzones
Add a runtime configuration option to control whether loading shared libraries via dlopen(3) uses
the GNU extension flag RTLD_DEEPBIND, if available.
The flag ensures symbol lookup will prefer symbols from the shared object itself over global ones,
which can resolve symbol namespace collisions in third party dependencies, see 601140cbe9a
("New versions of glibc support a RTLD_DEEPBIND flag to dlopen. The").
However using this flag symbols from preloaded libraries might be de- prioritized, e.g. free(3) from
a preloaded allocator by the standard libc. This results in one allocator allocating memory and
another one deallocating it, triggering double/invalid-free assertions.
Closes: #10670