mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Backport accel_globals->key leak fix (8.3)
Closes GH-18602.
This commit is contained in:
parent
41e11a627d
commit
b2d78ae00c
2 changed files with 5 additions and 2 deletions
1
NEWS
1
NEWS
|
@ -34,6 +34,7 @@ PHP NEWS
|
||||||
memory_consumption or jit_buffer_size). (nielsdos)
|
memory_consumption or jit_buffer_size). (nielsdos)
|
||||||
. Fixed bug GH-18567 (Preloading with internal class alias triggers assertion
|
. Fixed bug GH-18567 (Preloading with internal class alias triggers assertion
|
||||||
failure). (nielsdos)
|
failure). (nielsdos)
|
||||||
|
. Fix leak of accel_globals->key. (nielsdos)
|
||||||
|
|
||||||
- PDO_OCI:
|
- PDO_OCI:
|
||||||
. Fixed bug GH-18494 (PDO OCI segfault in statement GC). (nielsdos)
|
. Fixed bug GH-18494 (PDO OCI segfault in statement GC). (nielsdos)
|
||||||
|
|
|
@ -2937,12 +2937,10 @@ static void accel_globals_ctor(zend_accel_globals *accel_globals)
|
||||||
GC_MAKE_PERSISTENT_LOCAL(accel_globals->key);
|
GC_MAKE_PERSISTENT_LOCAL(accel_globals->key);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ZTS
|
|
||||||
static void accel_globals_dtor(zend_accel_globals *accel_globals)
|
static void accel_globals_dtor(zend_accel_globals *accel_globals)
|
||||||
{
|
{
|
||||||
zend_string_free(accel_globals->key);
|
zend_string_free(accel_globals->key);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_HUGE_CODE_PAGES
|
#ifdef HAVE_HUGE_CODE_PAGES
|
||||||
# ifndef _WIN32
|
# ifndef _WIN32
|
||||||
|
@ -3384,6 +3382,8 @@ void accel_shutdown(void)
|
||||||
if (!ZCG(enabled) || !accel_startup_ok) {
|
if (!ZCG(enabled) || !accel_startup_ok) {
|
||||||
#ifdef ZTS
|
#ifdef ZTS
|
||||||
ts_free_id(accel_globals_id);
|
ts_free_id(accel_globals_id);
|
||||||
|
#else
|
||||||
|
accel_globals_dtor(&accel_globals);
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -3398,6 +3398,8 @@ void accel_shutdown(void)
|
||||||
|
|
||||||
#ifdef ZTS
|
#ifdef ZTS
|
||||||
ts_free_id(accel_globals_id);
|
ts_free_id(accel_globals_id);
|
||||||
|
#else
|
||||||
|
accel_globals_dtor(&accel_globals);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!_file_cache_only) {
|
if (!_file_cache_only) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue