[php-src] Issue #8185: pear install: error in malloc_consolidate

From: Date: Fri, 22 Apr 2022 19:46:31 +0000
Subject: [php-src] Issue #8185: pear install: error in malloc_consolidate
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-241182@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/8185 Comment Author: arnaud-lb I dug into this bug again today: The problem happens because pear is loading the zlib extension dynamically with [dl()](https://www.php.net/dl). This causes the extension to allocate resources with a storage whose lifespan is shorter than the resources themselves. The extension creates interned strings for ini entries during a phase when truly permanent interned strings are read only, so the interned strings are created with a request scope, which is shorter than the ini entries _in ZTS builds_. A workaround for this problem is to load the zlib extension earlier by using the [extension](https://www.php.net/manual/en/ini.core.php#ini.extension) directive. Currently the manual for dl() has a note stating that the dl() function is currently not supported in ZTS builds.

« previous php.bugs (#241182) next »