#
e0b1b693 |
| 10-Oct-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix OSS-Fuzz #371445205: Heap-use-after-free in attr_free zend_hash_get_current_key() does not return a string with incremented refcount, so it shouldn't get released. This release cause
Fix OSS-Fuzz #371445205: Heap-use-after-free in attr_free zend_hash_get_current_key() does not return a string with incremented refcount, so it shouldn't get released. This release caused a UAF later when the attribute was destroyed. This wasn't noticed earlier because object_init_with_constructor() was only ever tested with interned strings. Closes GH-16349.
show more ...
|
#
8e6d8cf1 |
| 23-Sep-2024 |
DanielEScherzer |
GH-15976: don't say "type alias" (#15996) Follow-up to GH-15977
|
#
79d708cf |
| 21-Sep-2024 |
Daniel Scherzer |
GH-15976: clarify error messages for enum/trait/interface/alias names Instead of always saying that a name is reserved or deprecated and cannot/should not be used as a class name, take t
GH-15976: clarify error messages for enum/trait/interface/alias names Instead of always saying that a name is reserved or deprecated and cannot/should not be used as a class name, take the usage into account and say the name cannot be used as an enum name, trait name, etc. In the process, for class names add a missing "a".
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)
|
#
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 ...
|
#
58aa6fc8 |
| 19-May-2023 |
Arnaud Le Blanc |
Lazy objects RFC: https://wiki.php.net/rfc/lazy-objects Closes GH-15019
|
#
8df557ac |
| 27-Aug-2024 |
Ilija Tovilo |
[RFC] Asymmetric visibility v2 (GH-15063) Co-authored-by: Larry Garfield <larry@garfieldtech.com>
|
#
8d12f666 |
| 24-Aug-2024 |
Máté Kocsis |
Fix registration of internal readonly child classes (#15459) Currently, internal classes are registered with the following code: INIT_CLASS_ENTRY(ce, "InternalClass", class_Internal
Fix registration of internal readonly child classes (#15459) Currently, internal classes are registered with the following code: INIT_CLASS_ENTRY(ce, "InternalClass", class_InternalClass_methods); class_entry = zend_register_internal_class_ex(&ce, NULL); class_entry->ce_flags |= ...; This has worked well so far, except if InternalClass is readonly. It is because some inheritance checks are run by zend_register_internal_class_ex before ZEND_ACC_READONLY_CLASS is added to ce_flags. The issue is fixed by adding a zend_register_internal_class_with_flags() zend API function that stubs can use from now on. This function makes sure to add the flags before running any checks. Since the new API is not available in lower PHP versions, gen_stub.php has to keep support for the existing API for PHP 8.3 and below.
show more ...
|
#
5853cdb7 |
| 20-Aug-2024 |
Gina Peter Bnayard |
Use "must not" instead of "cannot" wording
|
#
96d572a1 |
| 18-Aug-2024 |
Gina Peter Bnayard |
Zend: Add helper for "cannot be empty" ValueError
|
#
a79c70f5 |
| 14-Aug-2024 |
Gina Peter Banyard |
[RFC] Convert exit (and die) from language constructs to functions (#13483) RFC: https://wiki.php.net/rfc/exit-as-function
|
#
d41e97ae |
| 24-Jul-2024 |
Dmitry Stogov |
Workaraound against false positive GCC array bounds error (#15078) This prevents compilation error when compiling PHP by GCC with "-O2 -g -Wall -Werror" zend_API.c:2754:34: error: a
Workaraound against false positive GCC array bounds error (#15078) This prevents compilation error when compiling PHP by GCC with "-O2 -g -Wall -Werror" zend_API.c:2754:34: error: array subscript ‘zend_function {aka const union _zend_function}[0]’ is partly outside array bounds of ‘unsigned char[160]’ [-Werror=array-bounds=] 2754 | if (ZSTR_VAL(fptr->common.function_name)[0] != '_'
show more ...
|
#
1fbb6665 |
| 17-Jul-2024 |
Arnaud Le Blanc |
Use zend_std_build_properties() to access zend_object.properties The zend_object.properties HashTable needs to be built just in time by calling rebuild_object_properties() on the object
Use zend_std_build_properties() to access zend_object.properties The zend_object.properties HashTable needs to be built just in time by calling rebuild_object_properties() on the object before accessing it. Normally this is done automatically in zend_std_get_properties(), but we do it manually in a few places. In this change I introduce an inline variant of zend_std_build_properties(), and refactor these places to use it instead of calling rebuild_object_properties() manually. rebuild_object_properties() renamed as rebuild_object_properties_internal(), to enforce usage of zend_std_get_properties() or zend_std_build_properties_ex(). Closes GH-14996
show more ...
|
#
780a8280 |
| 14-Jul-2024 |
Ilija Tovilo |
[RFC] Property hooks (#13455) RFC: https://wiki.php.net/rfc/property-hooks Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
|
#
84a0da15 |
| 09-Jun-2024 |
Peter Kokot |
Sync #if/ifdef/defined (#14508) This syncs CPP macro conditions: - _WIN32 - _WIN64 - HAVE_ALLOCA_H - HAVE_ALPHASORT - HAVE_ARPA_INET_H - HAVE_CONFIG_H - HAVE_DIRE
Sync #if/ifdef/defined (#14508) This syncs CPP macro conditions: - _WIN32 - _WIN64 - HAVE_ALLOCA_H - HAVE_ALPHASORT - HAVE_ARPA_INET_H - HAVE_CONFIG_H - HAVE_DIRENT_H - HAVE_DLFCN_H - HAVE_GETTIMEOFDAY - HAVE_LIBDL - HAVE_POLL_H - HAVE_PWD_H - HAVE_SCANDIR - HAVE_SYS_FILE_H - HAVE_SYS_PARAM_H - HAVE_SYS_SOCKET_H - HAVE_SYS_TIME_H - HAVE_SYS_TYPES_H - HAVE_SYS_WAIT_H - HAVE_UNISTD_H - PHP_WIN32 - ZEND_WIN32 These are either undefined or defined to 1 in Autotools and Windows. Follow up of GH-5526 (-Wundef).
show more ...
|
#
51379d66 |
| 06-Jun-2024 |
Gina Peter Banyard |
Zend: Add object_init_with_constructor() API (#14440) This will instantiate the object and execute its constructor with the given parameters.
|
#
1c30c5e7 |
| 18-Apr-2024 |
Ilija Tovilo |
Print location on class redeclaration Fixes GH-13950 Closes GH-13999
|
#
f2e199e8 |
| 25-Feb-2024 |
Máté Kocsis |
Implement "support doc comments for internal classes and functions" (#13266) Fixes #13130
|
#
2f605820 |
| 13-Feb-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Workaround ZTS persistent resource crashes (PHP 8.3 and lower) For master (8.4-dev) I merged GH-13381. But that PR changes public API of TSRM, so cannot be used on lower branches.
Workaround ZTS persistent resource crashes (PHP 8.3 and lower) For master (8.4-dev) I merged GH-13381. But that PR changes public API of TSRM, so cannot be used on lower branches. This patch is a safe workaround for the issue, in combination with a pre-existing fix using `ifdef ZTS + if (module_started)` inside pgsql and odbc. The idea is to delay unloading modules until the persistent resources are destroyed. This will keep the destructor code accessible in memory. This is not a proper fix on its own, because we still need the workaround of not accessing globals after module destruction. The proper fix is in master. Closes GH-13388.
show more ...
|
#
87edeed3 |
| 13-Jan-2024 |
Michael Voříšek |
Remove UNEXPECTED from typed prop checks Closes GH-13143
|
#
631bc816 |
| 06-Feb-2024 |
Ilija Tovilo |
Implement stackless internal function calls Co-authored-by: Dmitry Stogov <dmitry@zend.com> Closes GH-12461
|
#
513224cf |
| 10-Jan-2024 |
ju1ius |
prevents using resource as a zend_type Closes #13102
|
#
a8c6c616 |
| 07-Oct-2023 |
Jakub Zelenka |
Fix GH-9921: Loading ext in FPM config does not register module handlers Closes GH-12377
|
#
af3d2f7e |
| 18-Oct-2023 |
Ilija Tovilo |
Fix double-free of doc_comment when overriding static property via trait When redeclaring an overridden static property with a trait we're removing the property from the class. However,
Fix double-free of doc_comment when overriding static property via trait When redeclaring an overridden static property with a trait we're removing the property from the class. However, because the property itself does not belong to the class we must not free its associated data. This issue is exposed by 9a250cc9d6 in PHP 8.3+ because duplicate static properties in traits are no longer skipped, but redeclared. Fixes GH-12468
show more ...
|
#
cdfa0168 |
| 19-Oct-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Avoid refcounted copy in _object_properties_init() for internal classes (#12474) This currently uses ZVAL_COPY_OR_DUP, which copies the value and handles refcounting. However, internal c
Avoid refcounted copy in _object_properties_init() for internal classes (#12474) This currently uses ZVAL_COPY_OR_DUP, which copies the value and handles refcounting. However, internal classes cannot have refcounted default properties because of constraints imposed by zend_declare_typed_property(). So copying the value is sufficient. While this doesn't really improve the performance for our benchmarks, it improves performance for cases where a lot of temporary internal objects are instantiated. For example, when instantiating DOM classes: DOM objects are transient, so lots of temporary objects are created.
show more ...
|