History log of /PHP-8.3/ext/opcache/zend_persist.c (Results 1 – 25 of 257)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 42ede559 02-May-2024 Ilija Tovilo

Fix persisting of inherited class constants

Class constants are inherited to user classes without cloning. Thus, internal
class constants should not be persisted at all. Simply keep poin

Fix persisting of inherited class constants

Class constants are inherited to user classes without cloning. Thus, internal
class constants should not be persisted at all. Simply keep pointing to the
internal class constant.

Fixes GH-14109
Closes GH-14114

show more ...


# 55e61769 23-Mar-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-13433: Segmentation Fault in zend_class_init_statics when using opcache.preload

This regressed in 9a250cc9d6, which allowed static properties to get
overridden by a trait during i

Fix GH-13433: Segmentation Fault in zend_class_init_statics when using opcache.preload

This regressed in 9a250cc9d6, which allowed static properties to get
overridden by a trait during inheritance. In particular, because of the
change to the loop in zend_update_parent_ce(), it's not guaranteed that
all indirects are after one another.

This means that during persisting the zvals of the static members table,
some static properties may be skipped. In case of the test code, this
means that the array in the trait will keep referring to the old, new
freed, stale value. To solve this, we check the type for IS_INDIRECT,
which is the same as what zend_persist_calc() is already doing anyway.

Since 2543e61aed we can check for IS_INDIRECT to see if it should be
persisted or not.

Closes GH-13794.

show more ...


# 10d912d6 18-Mar-2024 Bob Weinand

Fix GH-13712: Segmentation fault for enabled observers when calling trait method of internal trait when opcache is loaded (#13735)

Inherited methods regardless of source must share the origi

Fix GH-13712: Segmentation fault for enabled observers when calling trait method of internal trait when opcache is loaded (#13735)

Inherited methods regardless of source must share the original runtime cache. Traits were missed.
This adds ZEND_ACC_TRAIT_CLONE to internal functions as well to allow easy distinction of these.

show more ...


# 2196e229 13-Aug-2023 Cristian Rodríguez

Use zend_ast_size consistenly (#11955)

* opcache: use zend_ast_size helper in zend_persist_ast

* opcache: use zend_ast_size helper in zend_persist_ast_calc

* Zend: fix zend

Use zend_ast_size consistenly (#11955)

* opcache: use zend_ast_size helper in zend_persist_ast

* opcache: use zend_ast_size helper in zend_persist_ast_calc

* Zend: fix zend_ast_size definition

It is better not to use sizeof(struct_with_flexible_array)
and instead rely on offsetof(type, member) like most
other similar wrappers do.

show more ...


# d5ad7510 08-Jun-2023 George Peter Banyard

More usage of known zend_str instead of C string (#11381)


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
# 0b1d750d 11-Aug-2022 Ilija Tovilo

Allow arbitrary expressions in static variable initializer

Closes GH-9301


# 414f71a9 16-Apr-2023 Máté Kocsis

Typed class constants (#10444)

RFC: https://wiki.php.net/rfc/typed_class_constants

Co-Authored-By: Ben <7127204+moliata@users.noreply.github.com>
Co-Authored-By: Bob Weinand <31

Typed class constants (#10444)

RFC: https://wiki.php.net/rfc/typed_class_constants

Co-Authored-By: Ben <7127204+moliata@users.noreply.github.com>
Co-Authored-By: Bob Weinand <3154871+bwoebi@users.noreply.github.com>
Co-Authored-By: Ilija Tovilo <ilija.tovilo@me.com>

show more ...


# 9a250cc9 25-Mar-2023 Ilija Tovilo

Add separate static property through trait if parent already declares it

Fixes GH-10935
Closes GH-10937


# 7202fe16 27-Feb-2023 Ilija Tovilo

Fix GH-10709: UAF in recursive AST evaluation

Fixes https://oss-fuzz.com/testcase-detail/6445949468934144
Closes GH-10718


# 413844d6 18-Feb-2023 Max Kellermann

Zend/zend_types.h: deprecate zend_bool, zend_intptr_t, zend_uintptr_t (#10597)

These types are standard C99.

For compatibility with out-of-tree extensions, keep the typedefs
in

Zend/zend_types.h: deprecate zend_bool, zend_intptr_t, zend_uintptr_t (#10597)

These types are standard C99.

For compatibility with out-of-tree extensions, keep the typedefs
in main/php.h.

show more ...


# 64127b66 29-Jan-2023 George Peter Banyard

Concatenating two valid UTF-8 strings produces a valid UTF-8 string

The UTF-8 valid flag needs to be copied upon interning,
otherwise strings that are concatenated at compile time lose t

Concatenating two valid UTF-8 strings produces a valid UTF-8 string

The UTF-8 valid flag needs to be copied upon interning,
otherwise strings that are concatenated at compile time lose this information.

However, if previously this string was interned without the flag it is not added
E.g. in the case the string is an existing class name.

Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com>

show more ...


# b30448f4 02-Nov-2022 Bob Weinand

Fix observing inherited internal functions

Fixes GH-9871


# 5e9654be 22-Oct-2022 Bob Weinand

Fixed missing run_time_cache for preloaded arena allocated internal functions

This effectively affected all preloaded enums, leading them to possibly share a run_time_cache__ptr slot with un

Fixed missing run_time_cache for preloaded arena allocated internal functions

This effectively affected all preloaded enums, leading them to possibly share a run_time_cache__ptr slot with unrelated functions. (Given that these were not set again.)
This bugfix is not accompanied by a test, due to how hard to trigger it was and getting a crash also depends a lot on the precise alignment of whether a cache entry accidentally overlapping has been used etc.

show more ...


Revision tags: php-8.2.0beta2, php-8.1.9, php-8.0.22, php-8.1.9RC1, php-8.2.0beta1, php-8.0.22RC1
# 34b11a75 18-Jul-2022 Dmitry Stogov

Fix memory leaks in
Zend/tests/type_declarations/union_types/inheritance.phpt introduced by f24548e21763eea9e8fb80e1c58c388ea52ab086


# f24548e2 18-Jul-2022 Dmitry Stogov

Fix invalid free() during type persistence

Fixes oss-fuzz #49042


# f9055907 08-Jul-2022 George Peter Banyard

Add support for Disjoint Normal Form (DNF) types (#8725)

RFC: https://wiki.php.net/rfc/dnf_types

This allows to combine union and intersection types together in the following form (

Add support for Disjoint Normal Form (DNF) types (#8725)

RFC: https://wiki.php.net/rfc/dnf_types

This allows to combine union and intersection types together in the following form (A&B)|(X&Y)|T but not of the form (X|A)&(Y|B) or (X|A)&(Y|B)|T.

* Improve union type parsing

Co-authored-by: Sara Golemon <pollita@php.net>

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, php-8.0.20, php-8.1.7, php-8.2.0alpha1, php-7.4.30, php-8.1.7RC1, php-8.0.20RC1, php-8.1.6, php-8.0.19, 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
# ddc0b490 10-Mar-2022 Ilija Tovilo

Allow arbitrary const expressions in backed enums

Closes GH-7821
Closes GH-8190
Closes GH-8418


# 04a4864b 24-Mar-2022 Max Kellermann

ext/opcache: merge redundant code and "bool" refactoring (#8237)

* ext/opcache/ZendAccelerator: make check_persistent_script_access() static

* ext/opcache/ZendAccelerator: convert "

ext/opcache: merge redundant code and "bool" refactoring (#8237)

* ext/opcache/ZendAccelerator: make check_persistent_script_access() static

* ext/opcache/ZendAccelerator: convert "int" to "bool"

* ext/opcache/zend_file_cache: convert "int" to "bool"

* ext/opcache: use true/false for zend_persistent_script.corrupted

* ext/opcache/ZendAccelerator: move duplicate code to zend_accel_discard_script()

* ext/opcache/ZendAccelerator: convert accel_deactivate_now() to function

Simplify the #iddef ZEND_WIN32.

* ext/opcache/zend_file_cache: simplify iovec initializer

* ext/opcache/zend_file_cache: add local zend_string* variables

Eliminates lots of redundant casts and avoids reloading the variable
from RAM into registers.

* ext/opcache/zend_file_cache: use ZSTR_VAL()

* ext/opcache/zend_file_cache: move code to zend_file_cache_script_write()

This eliminates duplicate error handling code.

show more ...


Revision tags: php-8.1.4RC1, php-8.0.17RC1, php-8.1.3, php-8.0.16, php-7.4.28, php-8.1.3RC1, php-8.0.16RC1, php-8.1.2, php-8.0.15, php-8.1.2RC1, php-8.0.15RC1
# 4543cd32 30-Dec-2021 Nikita Popov

Remove JMPZNZ opcode

While JMPZNZ can avoid execution of a separate JMP opcode in some
cases, it also prevents smart branch optimization, so creating
JMPZNZ may actually have a negat

Remove JMPZNZ opcode

While JMPZNZ can avoid execution of a separate JMP opcode in some
cases, it also prevents smart branch optimization, so creating
JMPZNZ may actually have a negative effect. It also adds additional
complexity for optimizations.

Drop JMPZNZ in favor of JMPZ+JMP or JMPNZ+JMP.

Closes GH-7857.

show more ...


# a066b809 27-Dec-2021 Dmitry Stogov

Skip abstract methods


Revision tags: php-8.0.14, php-8.1.1, php-7.4.27, php-8.1.1RC1, php-8.0.14RC1
# 024d5f4b 01-Dec-2021 Tyson Andre

Cache method overrides of ArrayAccess in zend_class_entry

Previously, code such as subclasses of SplFixedArray would check for method
overrides when instantiating the objects.

T

Cache method overrides of ArrayAccess in zend_class_entry

Previously, code such as subclasses of SplFixedArray would check for method
overrides when instantiating the objects.

This optimization was mentioned as a followup to GH-6552

show more ...


Revision tags: php-7.4.27RC1, php-8.1.0
# 76548e50 17-Nov-2021 Dmitry Stogov

Fixed bug #81607 (CE_CACHE allocation with concurrent access)


Revision tags: php-8.0.13, php-7.4.26, php-7.3.33, php-8.1.0RC6
# 90b7bde6 03-Nov-2021 Dmitry Stogov

Use more compact representation for packed arrays.

- for packed arrays we store just an array of zvals without keys.
- the elements of packed array are accessible throuf as ht->arPacked[

Use more compact representation for packed arrays.

- for packed arrays we store just an array of zvals without keys.
- the elements of packed array are accessible throuf as ht->arPacked[i]
instead of ht->arData[i]
- in addition to general ZEND_HASH_FOREACH_* macros, we introduced similar
familied for packed (ZEND_HASH_PACKED_FORECH_*) and real hashes
(ZEND_HASH_MAP_FOREACH_*)
- introduced an additional family of macros to access elements of array
(packed or real hashes) ZEND_ARRAY_ELEMET_SIZE, ZEND_ARRAY_ELEMET_EX,
ZEND_ARRAY_ELEMET, ZEND_ARRAY_NEXT_ELEMENT, ZEND_ARRAY_PREV_ELEMENT
- zend_hash_minmax() prototype was changed to compare only values

Because of smaller data set, this patch may show performance improvement
on some apps and benchmarks that use packed arrays. (~1% on PHP-Parser)

TODO:
- sapi/phpdbg needs special support for packed arrays (WATCH_ON_BUCKET).
- zend_hash_sort_ex() may require converting packed arrays to hash.

show more ...


Revision tags: php-7.4.26RC1, php-8.0.13RC1, php-8.1.0RC5, php-7.3.32
# 6b2b4bb1 19-Oct-2021 Nikita Popov

Remove unused scope argument


Revision tags: php-7.4.25, php-8.0.12, php-8.1.0RC4, php-8.0.12RC1, php-7.4.25RC1
# e8e4852e 05-Oct-2021 Nikita Popov

Restore CE_CACHE clear on persist

We still need to do this in case early binding succeeds and caches
the class. We could guard that by !in_compilation as well, but in
this case the p

Restore CE_CACHE clear on persist

We still need to do this in case early binding succeeds and caches
the class. We could guard that by !in_compilation as well, but in
this case the previous cache clearing should be reliable, so
restore it.

show more ...


1234567891011