#
21196ca9 |
| 17-Sep-2024 |
DanielEScherzer |
zend_enum.c: make a bunch of pointers `const` (#15932) * zend_enum.c: make a bunch of pointers `const` * interface_gets_implemented needs non-constant * zend_enum.h: update
zend_enum.c: make a bunch of pointers `const` (#15932) * zend_enum.c: make a bunch of pointers `const` * interface_gets_implemented needs non-constant * zend_enum.h: update zend_verify_enum() signature
show more ...
|
#
888eb370 |
| 14-Sep-2024 |
Peter Kokot |
Fix -Wundef/C4668 warnings (#15853) - ZTS is either undefined or defined (to 1) - PHP_WIN32 is either undefined or defined (to 1) - HAVE_LIBEDIT is either undefined or defined (to 1)
|
#
08e0729c |
| 08-Sep-2024 |
Ilija Tovilo |
Fix uninitialized lineno in constant AST of internal enums Closes GH-15806
|
#
25d76162 |
| 06-Sep-2024 |
Bob Weinand |
Make internal run_time_cache a persistent allocation (#15040) We also add zend_map_ptr_static, so that we do not incur the overhead of constantly recreating the internal run_time_cache point
Make internal run_time_cache a persistent allocation (#15040) We also add zend_map_ptr_static, so that we do not incur the overhead of constantly recreating the internal run_time_cache pointers on each request. This mechanism might be extended for mutable_data of internal classes too.
show more ...
|
#
423fc811 |
| 06-Aug-2024 |
Christoph M. Becker |
zend_enum: Rename try parameter to avoid conflict with C++ `try` is a keyword in C++, and as such C++ code including <zend_enum.h> fails to compile unless a workaround is in place. To r
zend_enum: Rename try parameter to avoid conflict with C++ `try` is a keyword in C++, and as such C++ code including <zend_enum.h> fails to compile unless a workaround is in place. To resolve this, we simply rename the parameter. We choose `try_from` to make it clear that this parameter is true when the function is called from `BackedEnum::tryFrom()`. For consistency, we also rename the `try` parameter of `zend_enum_from_base()`, although that function is not exported. This issue had been reported by @oplanre, who also provided an initial PR. Closes GH-15259.
show more ...
|
#
f2e199e8 |
| 25-Feb-2024 |
Máté Kocsis |
Implement "support doc comments for internal classes and functions" (#13266) Fixes #13130
|
#
53dbb760 |
| 10-Oct-2023 |
Ilija Tovilo |
Fix use-after-free of constant name The constant name is usually interend. Without opcache, compilation always interns strings. Without opcache, compilation does not intern (new) strings
Fix use-after-free of constant name The constant name is usually interend. Without opcache, compilation always interns strings. Without opcache, compilation does not intern (new) strings, but persisting of script does. If a script is not stored in shm the constant name will not be interned. The building of enum backing stores was missing a addref for the constant name, leading to a double-free when releasing constants and backing stores of enums. Fixes GH-12366 Closes GH-12405
show more ...
|
#
d5ad7510 |
| 08-Jun-2023 |
George Peter Banyard |
More usage of known zend_str instead of C string (#11381)
|
#
ce724d18 |
| 02-Jun-2023 |
George Peter Banyard |
Assert zend_constant exist If not the enum case does not exist and it is a programming error
|
#
9d5f2f13 |
| 20-Mar-2023 |
Ilija Tovilo |
Use new ZSTR_INIT_LITERAL macro (#10879)
|
#
3bcf2c37 |
| 28-Feb-2023 |
Máté Kocsis |
Allow readonly properties to be reinitialized once during cloning (#10389) RFC: https://wiki.php.net/rfc/readonly_amendments
|
#
d5c649b3 |
| 23-Feb-2023 |
Max Kellermann |
zend_compiler, ...: use `uint8_t` instead of `zend_uchar` (#10621) `zend_uchar` suggests that the value is an ASCII character, but here, it's about very small integers. This is misleadi
zend_compiler, ...: use `uint8_t` instead of `zend_uchar` (#10621) `zend_uchar` suggests that the value is an ASCII character, but here, it's about very small integers. This is misleading, so let's use a C99 integer instead. On all architectures currently supported by PHP, `zend_uchar` and `uint8_t` are identical. This change is only about code readability.
show more ...
|
#
d46dea16 |
| 18-Feb-2023 |
Max Kellermann |
Make globals const (part 2) (#10610) * Zend/zend_enum: make `forbidden_methods` static+const * main/php_syslog: make `xdigits` static * sapi/fpm: make several globals `cons
Make globals const (part 2) (#10610) * Zend/zend_enum: make `forbidden_methods` static+const * main/php_syslog: make `xdigits` static * sapi/fpm: make several globals `const` * sapi/phpdbg: make `OPTIONS` static * sapi/phpdbg/help: make help texts const * sapi/cli: make `template_map` const * ext/ffi: make `zend_ffi_types` static * ext/bcmath: make `ref_str` const * ext/phar: make several globals static+const
show more ...
|
#
e560592a |
| 21-Dec-2022 |
Petar Obradović |
Fix GH-9675: Re-adjust run_time_cache init for internal enum methods Closes GH-10143.
|
#
bf1cfc07 |
| 16-Jan-2023 |
Christoph M. Becker |
Revert GH-10300 Cf. <https://github.com/php/php-src/pull/10220#issuecomment-1383739816>. This reverts commit 68ada76f9a659745f572539b72afa06fa75a866f. his reverts commit 45384c6
Revert GH-10300 Cf. <https://github.com/php/php-src/pull/10220#issuecomment-1383739816>. This reverts commit 68ada76f9a659745f572539b72afa06fa75a866f. his reverts commit 45384c6e201eda9963e2fcc18946a9446230a2d6. This reverts commit ef7fbfd71025f034b0bfcb413efd181ce798fc1b. This reverts commit 9b9ea0d7c696f2990a159b2a2dafbc04547dc10f. This reverts commit f15747c26be4a2330dc0cf3ea442f53f30f84cac. This reverts commit e883ba93c40827fafd7868517eb48e04569f76ab. This reverts commit 7e87551c3775d26e20b06a4032a00053db6452cc. This reverts commit 921274d2b8966641a00c0a767ae40ba7187bdffc. This reverts commit fc1f528e5e3ee45ab17ae8dcfad6a6422ff2002d. This reverts commit 0961715cdafb5d39124667ff94f3b56453ce71f1. This reverts commit a93f264526e1cdade71d887800c1c448c411bfdc. This reverts commit 72dd94e1c6d29203b8f6473317f626e6d6d6fbdc. This reverts commit 29b2dc89645e741f91cc920964432dccd2aaef14. This reverts commit 05c7653bba7571852f5ce6fc0d220a1a829bc4c0. This reverts commit 5190e5c260ee05e3f3c3d1168263a1a6637441d0. This reverts commit 6b55bf228cb2da8705737d414f394950a92d8aae. This reverts commit 184b4a12d3215d105720d005b31e365249e2eb21. This reverts commit 4c31b7888a561e920fd3889ba8d99368f3c2d9e6. This reverts commit d44e9680f080b4918cfed268b96f90ea35975617. This reverts commit 4069a5c43f419d76e1254c8e49b4cad9968a408f.
show more ...
|
#
0961715c |
| 04-Jan-2023 |
Max Kellermann |
Zend/zend_enum: include cleanup
|
#
3daa8a93 |
| 22-Sep-2022 |
Ilija Tovilo |
Fix default_object_handlers pointing to invalid memory with file_cache Closes GH-9596
|
#
5a0b68be |
| 14-Sep-2022 |
Bob Weinand |
Revert "Store default object handlers alongside the class entry" This reverts commit 9e6eab3c139b41dc976dd5305fd1a6e387e5e27f. Reverted along a01dd9fedaecd2e5b95bc5c2e8d6542116addea
Revert "Store default object handlers alongside the class entry" This reverts commit 9e6eab3c139b41dc976dd5305fd1a6e387e5e27f. Reverted along a01dd9fedaecd2e5b95bc5c2e8d6542116addeae.
show more ...
|
Revision tags: php-8.2.0RC1, php-8.1.10, php-8.0.23, php-8.0.23RC1, php-8.1.10RC1, php-8.2.0beta3, php-8.2.0beta2, php-8.1.9, php-8.0.22 |
|
#
9e6eab3c |
| 22-Jul-2022 |
Bob Weinand |
Store default object handlers alongside the class entry Object handlers being separate from class entries is a legacy inherited from PHP 5. Today it has little benefit to keep them separate:
Store default object handlers alongside the class entry Object handlers being separate from class entries is a legacy inherited from PHP 5. Today it has little benefit to keep them separate: in fact, accessing object handlers usually requires not-so-safe hacks. While it is possible to swap handlers in a custom installed create_object handler, this mostly is tedious, as well as it requires allocating the object handlers struct at runtime, possibly caching it etc.. This allows extensions, which intend to observe other classes to install their own class handlers. The life cycle of internal classes may now be simply observed by swapping the class handlers in post_startup stage. The life cycle of userland classes may be observed by iterating over the new classes in zend_compile_file and zend_compile_string and then swapping their handlers. In general, this would also be a first step in directly tying the object handlers to classes. Especially given that I am not aware of any case where the object handlers would be different between various instances of a given class. Signed-off-by: Bob Weinand <bobwei9@hotmail.com>
show more ...
|
#
9b984f52 |
| 23-Aug-2022 |
Ollie Read
|
Enum error message consistency (#9350)
|
#
dc5475c1 |
| 28-Jul-2022 |
Bob Weinand |
Save previous observer on the VM stack This avoids a possible significant performance penalty, when some leaf function was observed, deep in the stack. As a side effect, we are not itera
Save previous observer on the VM stack This avoids a possible significant performance penalty, when some leaf function was observed, deep in the stack. As a side effect, we are not iterating over prev_execute_data anymore and thus, non-observed fake frames, possibly on stack, cannot have any impact on the observer anymore (especially within zend_observer_fcall_end_all). Saving the previous observer happens now directly on the VM stack. If there is any observer, function frames are allocated an extra zval (the last temporary), which will, on observed frames, contain the previous observed frame address.
show more ...
|
#
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, php-8.0.21, php-8.1.8, php-8.2.0alpha3 |
|
#
76fcd70c |
| 25-Jun-2022 |
Ilija Tovilo |
Fix enum preloading again (#8859)
|
Revision tags: php-8.1.8RC1, php-8.2.0alpha2, php-8.0.21RC1 |
|
#
d9e1871c |
| 16-Jun-2022 |
Ilija Tovilo |
Fix leak of backed_enum_table with preloading
|
#
912c22cc |
| 16-Jun-2022 |
Ilija Tovilo |
Fix segfault when using preloaded enums
|