#
d0527427 |
| 09-Aug-2022 |
Jakub Zelenka |
Fix GH-8409: SSL handshake timeout persistent connections hanging This is not actually related to SSL handshake but stream socket creation which does not clean errors if the error handle
Fix GH-8409: SSL handshake timeout persistent connections hanging This is not actually related to SSL handshake but stream socket creation which does not clean errors if the error handler is set. This fix prevents emitting errors until the stream is freed.
show more ...
|
Revision tags: php-8.2.0beta2, php-8.1.9, php-8.0.22 |
|
#
625f1649 |
| 20-Jul-2022 |
Bob Weinand |
Include internal functions in the observer API There are two main motivations to this: a) The logic for handling internal and userland observation can be unified. b) Unwinding of obs
Include internal functions in the observer API There are two main motivations to this: a) The logic for handling internal and userland observation can be unified. b) Unwinding of observed functions on a bailout does notably not include observers. Even if users of observers were to ensure such handling themselves, it would be impossible to retain the relative ordering - either the user has to unwind all internal observed frames before the automatic unwinding (zend_observer_fcall_end_all) or afterwards, but not properly interleaved. Signed-off-by: Bob Weinand <bobwei9@hotmail.com>
show more ...
|
Revision tags: php-8.1.9RC1, php-8.2.0beta1, php-8.0.22RC1 |
|
#
4df3dd76 |
| 08-Jul-2022 |
Arnaud Le Blanc |
Reduce memory allocated by var_export, json_encode, serialize, and other (#8902) smart_str uses an over-allocated string to optimize for append operations. Functions that use smart_str tend
Reduce memory allocated by var_export, json_encode, serialize, and other (#8902) smart_str uses an over-allocated string to optimize for append operations. Functions that use smart_str tend to return the over-allocated string directly. This results in unnecessary memory usage, especially for small strings. The overhead can be up to 231 bytes for strings smaller than that, and 4095 for other strings. This can be avoided for strings smaller than `4096 - zend_string header size - 1` by reallocating the string. This change introduces `smart_str_trim_to_size()`, and calls it in `smart_str_extract()`. Functions that use `smart_str` are updated to use `smart_str_extract()`. Fixes GH-8896
show more ...
|
Revision tags: php-8.0.21, php-8.1.8, php-8.2.0alpha3, php-8.1.8RC1, php-8.2.0alpha2, php-8.0.21RC1 |
|
#
efc8f0eb |
| 17-Jun-2022 |
Arnaud Le Blanc |
Deprecate zend_atol() / add zend_ini_parse_quantity() (#7951) Add zend_ini_parse_quantity() and deprecate zend_atol(), zend_atoi() zend_atol() and zend_atoi() don't just do number p
Deprecate zend_atol() / add zend_ini_parse_quantity() (#7951) Add zend_ini_parse_quantity() and deprecate zend_atol(), zend_atoi() zend_atol() and zend_atoi() don't just do number parsing. They also check for a 'K', 'M', or 'G' at the end of the string, and multiply the parsed value out accordingly. Unfortunately, they ignore any other non-numerics between the numeric component and the last character in the string. This means that numbers such as the following are both valid and non-intuitive in their final output. * "123KMG" is interpreted as "123G" -> 132070244352 * "123G " is interpreted as "123 " -> 123 * "123GB" is interpreted as "123B" -> 123 * "123 I like tacos." is also interpreted as "123." -> 123 Currently, in php-src these functions are used only for parsing ini values. In this change we deprecate zend_atol(), zend_atoi(), and introduce a new function with the same behavior, but with the ability to report invalid inputs to the caller. The function's name also makes the behavior less unexpected: zend_ini_parse_quantity(). Co-authored-by: Sara Golemon <pollita@php.net>
show more ...
|
Revision tags: php-8.0.20, php-8.1.7, php-8.2.0alpha1, php-7.4.30, php-8.1.7RC1, php-8.0.20RC1 |
|
#
b63df3ce |
| 24-May-2022 |
Levi Morrison |
Stop copying zend_module_entry (#8551) I did some historical digging and could not figure out why a copy is made. Additionally, the copy was not using the `.size` member, so it was p
Stop copying zend_module_entry (#8551) I did some historical digging and could not figure out why a copy is made. Additionally, the copy was not using the `.size` member, so it was probably wrong, but it's been that way for quite some time.
show more ...
|
Revision tags: php-8.1.6, php-8.0.19 |
|
#
f07a08df |
| 06-May-2022 |
Arnaud Le Blanc |
Fix unregistering ini entries of dynamically loaded extension (#8435) Fixes GH-8185
|
Revision tags: php-8.1.6RC1, php-8.0.19RC1, php-8.0.18, php-8.1.5, php-7.4.29, php-8.1.5RC1, php-8.0.18RC1, php-8.1.4, php-8.0.17 |
|
#
c6a53f94 |
| 11-Mar-2022 |
Dmitry Stogov |
Fix non-reentirant startiong or error recording from error handler Fixes oss-fuzz #45398
|
#
e6bdf980 |
| 07-Mar-2022 |
Bob Weinand |
Put packed back to attribute iterating after merge
|
#
15949b61 |
| 07-Mar-2022 |
Bob Weinand |
Fix ZTS build after cherry-pick
|
#
0d7e10c1 |
| 07-Mar-2022 |
Tim Düsterhus |
Fix memory leak of function attribute hash table (#8070) ==109253== 280 (56 direct, 224 indirect) bytes in 1 blocks are definitely lost in loss record 4 of 4 ==109253== at 0x4
Fix memory leak of function attribute hash table (#8070) ==109253== 280 (56 direct, 224 indirect) bytes in 1 blocks are definitely lost in loss record 4 of 4 ==109253== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) ==109253== by 0x6D9FA2: __zend_malloc (zend_alloc.c:3068) ==109253== by 0x745138: zend_add_attribute (zend_attributes.c:226) ==109253== by 0x6680D1: zend_add_parameter_attribute (zend_attributes.h:102) ==109253== by 0x66B787: zm_startup_zend_test (test.c:478) ==109253== by 0x7224CD: zend_startup_module_ex (zend_API.c:2202) ==109253== by 0x72252C: zend_startup_module_zval (zend_API.c:2217) ==109253== by 0x734288: zend_hash_apply (zend_hash.c:2011) ==109253== by 0x722C30: zend_startup_modules (zend_API.c:2328) ==109253== by 0x67409B: php_module_startup (main.c:2256) ==109253== by 0x88EDDE: php_cli_startup (php_cli.c:409) ==109253== by 0x890F61: main (php_cli.c:1334)
show more ...
|
Revision tags: php-8.1.4RC1, php-8.0.17RC1, php-8.1.3, php-8.0.16, php-7.4.28 |
|
#
e6cf5831 |
| 12-Feb-2022 |
Bob Weinand |
Fix GH-8082: Prevent leaking memory on observed transient run_time_caches This is achieved by tracking the observers on the run_time_cache (with a fixed amount of slots, 2 for each observer)
Fix GH-8082: Prevent leaking memory on observed transient run_time_caches This is achieved by tracking the observers on the run_time_cache (with a fixed amount of slots, 2 for each observer). That way round, if the run_time_cache is freed all associated observer data is as well. This approach has been chosen, as to avoid any ABI or API breakage. Future versions may for example choose to provide a hookable API for run_time_cache freeing or similar.
show more ...
|
Revision tags: php-8.1.3RC1, php-8.0.16RC1, php-8.1.2, php-8.0.15, php-8.1.2RC1, php-8.0.15RC1, php-8.0.14, php-8.1.1, php-7.4.27 |
|
#
25bb229f |
| 10-Dec-2021 |
Tyson Andre |
Allocate less memory for EG(errors) when recording errors for opcache (#7744) errors is an array of pointers, not an array of values. Low importance since this is freed after opcach
Allocate less memory for EG(errors) when recording errors for opcache (#7744) errors is an array of pointers, not an array of values. Low importance since this is freed after opcache compiles a file and there are typically no or very few errors.
show more ...
|
Revision tags: php-8.1.1RC1, php-8.0.14RC1, php-7.4.27RC1 |
|
#
72f8dbb3 |
| 24-Nov-2021 |
Dmitry Stogov |
Fixed bug #81634 (ZEND_ENABLE_STATIC_TSRMLS_CACHE produces extensionswith the STATIC_TLS flag)
|
Revision tags: php-8.1.0, php-8.0.13, php-7.4.26, php-7.3.33, php-8.1.0RC6, php-7.4.26RC1, php-8.0.13RC1, php-8.1.0RC5, php-7.3.32, php-7.4.25, php-8.0.12 |
|
#
ddaf64b5 |
| 14-Oct-2021 |
Dmitry Stogov |
Avoid non-immutable map_ptr indirection
|
Revision tags: php-8.1.0RC4, php-8.0.12RC1, php-7.4.25RC1, php-8.1.0RC3, php-8.0.11, php-7.4.24, php-7.3.31, php-8.1.0RC2, php-7.4.24RC1, php-8.0.11RC1, php-8.1.0RC1 |
|
#
6434c93a |
| 26-Aug-2021 |
Nikita Popov |
Explicitly store real map ptr base If we only store the biased pointer, the map ptr region will not be recognized as reachable memory by leak checkers. This is primarily problematic
Explicitly store real map ptr base If we only store the biased pointer, the map ptr region will not be recognized as reachable memory by leak checkers. This is primarily problematic for fuzzing, because this is persistent memory that may be reallocated during the request, without being an actual leak. Avoid this by simply storing both the real base pointer of the allocation, as well as the biased base pointer used for accesses.
show more ...
|
Revision tags: php-7.4.23, php-8.0.10, php-7.3.30 |
|
#
116fa654 |
| 23-Aug-2021 |
Dmitry Stogov |
Fixed ZEND_MAP_PTR_KIND_PTR (it is not used)
|
Revision tags: php-8.1.0beta3 |
|
#
315f4094 |
| 11-Aug-2021 |
Nikita Popov |
Always use CE_CACHE, remove TYPE_HAS_CE (#7336) Currently, CE_CACHE on strings is only used with opcache interned strings. This patch extends usage to non-opcache interned strings as wel
Always use CE_CACHE, remove TYPE_HAS_CE (#7336) Currently, CE_CACHE on strings is only used with opcache interned strings. This patch extends usage to non-opcache interned strings as well. This means that most type strings can now make use of CE_CACHE even if opcache is not loaded, which allows us to remove TYPE_HAS_CE kind, and fix some discrepancies depending on whether a type stores a resolved or non-resolved name. There are two cases where CE_CACHE will not be used: * When opcache is not used and a permanent interned string (that is not an internal class name) is used as a type name during the request. In this case we can't allocate a map_ptr index for the permanent string, as it would be not be in the permanent map_ptr index space. * When opcache is used but the script is not cached (e.g. eval'd code or opcache full). If opcache is used, we can't allocate additional map_ptr indexes at runtime, because they may conflict with indexes allocated by opcache. In these two cases we would end up not using CE caching for property types (argument/return types still have the separate cache slot).
show more ...
|
Revision tags: php-8.0.10RC1, php-7.4.23RC1, php-8.1.0beta2, php-8.0.9 |
|
#
e0119525 |
| 28-Jul-2021 |
Nikita Popov |
Preload unlinked classes, remove preload autoload (#7311) Currently, classes that can't be linked get moved back into the original script and are not preloaded. As such classes may be re
Preload unlinked classes, remove preload autoload (#7311) Currently, classes that can't be linked get moved back into the original script and are not preloaded. As such classes may be referenced from functions that did get preloaded, there is a preload autoload mechanism to load them at runtime. Since PHP 8.1, we can safely preload unlinked classes, which will then go through usual lazy loading. This means that we no longer need the preload autoload mechanism. However, we need to be careful not to modify any hash table buckets in-place, and should create new buckets for lazy loaded classes.
show more ...
|
Revision tags: php-7.4.22 |
|
#
70195c35 |
| 27-Jul-2021 |
Nikita Popov |
Don't force property type resolution for include preloading Having all property types resolved is no longer a hard requirement for preloading, resolving the types is just an optimization
Don't force property type resolution for include preloading Having all property types resolved is no longer a hard requirement for preloading, resolving the types is just an optimization. As such, drop the special logic that forced loading of property types when include-based preloading is used. Instead only keep the code that resolves types based on actually preloaded classes. Also drop the ZEND_ACC_PROPERTY_TYPES_RESOLVED flag, which is now nearly useless and takes up flag space...
show more ...
|
Revision tags: php-8.1.0beta1, php-7.4.22RC1, php-8.0.9RC1 |
|
#
989205e9 |
| 12-Jul-2021 |
Nikita Popov |
Remove incorrect uses of zend_atoi() zend_atoi() parses integers with size suffixes (like "128M"). These just want to use a plain number, so use ZEND_ATOL instead.
|
#
efbb2198 |
| 12-Jul-2021 |
Nikita Popov |
Return value from ZEND_ATOL Instead of assigning it as part of the macro itself, which makes usage quite awkward.
|
Revision tags: php-8.1.0alpha3, php-7.4.21, php-7.3.29 |
|
#
aff36587 |
| 29-Jun-2021 |
Patrick Allaert |
Fixed some spaces used instead of tabs
|
Revision tags: php-8.0.8, php-8.1.0alpha2, php-7.4.21RC1 |
|
#
5d4f0552 |
| 15-Jun-2021 |
Aaron Piotrowski |
Drop fiber block hooks Removes the ability for an extension to allow Fiber switching in blocked contexts. See discussion on fdc22744a8951b605a546ad6f09a2b907043bc54.
|
#
ba3c8027 |
| 15-Jun-2021 |
Joe Watkins |
Adds zend_fiber_startup at the right stage, moves setting of switch hooks to correct stage In a threaded environment, these ought to be set before any threads are created, and they o
Adds zend_fiber_startup at the right stage, moves setting of switch hooks to correct stage In a threaded environment, these ought to be set before any threads are created, and they ought to be set once.
show more ...
|
Revision tags: php-8.0.8RC1 |
|
#
e6e6b3e6 |
| 11-Jun-2021 |
Aaron Piotrowski |
Improve fiber interoperability (#7128)
|