mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
Fix allocation loop in zend_shared_alloc_startup()
The break is outside the if, so if it succeeds or not this will always stop after the first loop iteration instead of trying more allocators if the first one fails. Closes GH-11306.
This commit is contained in:
parent
b2ec6c24f8
commit
6267601f84
3
NEWS
3
NEWS
@ -2,6 +2,9 @@ PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? ????, PHP 8.1.21
|
||||
|
||||
- Opcache:
|
||||
. Fix allocation loop in zend_shared_alloc_startup(). (nielsdos)
|
||||
|
||||
- Standard:
|
||||
. Fix access on NULL pointer in array_merge_recursive(). (ilutov)
|
||||
. Fix exception handling in array_multisort(). (ilutov)
|
||||
|
@ -179,8 +179,8 @@ int zend_shared_alloc_startup(size_t requested_size, size_t reserved_size)
|
||||
res = zend_shared_alloc_try(he, requested_size, &ZSMMG(shared_segments), &ZSMMG(shared_segments_count), &error_in);
|
||||
if (res) {
|
||||
/* this model works! */
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user