You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Another issue is that the implementation of putenv with ZTS may have a bug. Please take a look.
The environ is a global array, if multiple threads concurrently execute putenv with the same key, the pe.previous_value pointer may point to a memory address that has already been freed.
The putenv C function does not copy the string that is passed in; instead, it directly stores the pointer in environ.
Thread 1:
RINITputenv(env1)
pe.previous_value=NULL// ... more code
Description
https://github.com/php/php-src/blob/master/ext/standard/basic_functions.c#L846
The else branch of the
putenv
function does not calltsrm_env_unlock()
to release the lock, which could potentially lead to a deadlock.PHP Version
PHP 8.4
Operating System
Ubuntu 22.04
The text was updated successfully, but these errors were encountered: