History log of /PHP-8.2/ext/opcache/zend_accelerator_util_funcs.c (Results 1 – 25 of 192)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# e3499130 10-May-2023 Ilija Tovilo

Fix delayed early binding class redeclaration error

If we bind the class to the runtime slot even if we're not the ones who have
performed early binding we'll miss the redeclaration erro

Fix delayed early binding class redeclaration error

If we bind the class to the runtime slot even if we're not the ones who have
performed early binding we'll miss the redeclaration error in the
ZEND_DECLARE_CLASS_DELAYED handler.

Closes GH-11226

show more ...

# 6622c54c 15-Sep-2022 Ilija Tovilo

Fix class link observer with file_cache_only=1

Previously, notify would only get called on classes with CE_CACHE.
However, during compilation class names are non-permanent which won't

Fix class link observer with file_cache_only=1

Previously, notify would only get called on classes with CE_CACHE.
However, during compilation class names are non-permanent which won't
get a CE_CACHE and thus wouldn't not get notified.

Closes GH-9550

show more ...

# 7f74a300 25-Aug-2022 Dmitry Stogov

Reduce observer overhead when restoring script from opcache (#9413)

* Reduce observer overhead when restoring script from opcache

* typo

* Split loops to keep notifications

Reduce observer overhead when restoring script from opcache (#9413)

* Reduce observer overhead when restoring script from opcache

* typo

* Split loops to keep notifications in case of redeclaration errors

show more ...

# 396b2aab 23-Aug-2022 Bob Weinand

Wrap observer notify functions into inlined enabled checks

Signed-off-by: Bob Weinand <bobwei9@hotmail.com>

# bf427b73 11-Jul-2022 Bob Weinand

Add an API to observe functions and classes being linked

To observe when the functions and classes start being officially available to the user

Signed-off-by: Bob Weinand <bobwei9@h

Add an API to observe functions and classes being linked

To observe when the functions and classes start being officially available to the user

Signed-off-by: Bob Weinand <bobwei9@hotmail.com>

show more ...

# a6970838 01-Aug-2022 Arnaud Le Blanc

Extended map_ptr before copying class table (#9188)

Fixes GH-9164

# d56ec0a6 17-Nov-2021 Dmitry Stogov

Merge branch 'PHP-8.1'

* PHP-8.1:
Fixed bug #81607 (CE_CACHE allocation with concurrent access)


# 76548e50 17-Nov-2021 Dmitry Stogov

Fixed bug #81607 (CE_CACHE allocation with concurrent access)

# 89007f67 14-Oct-2021 Nikita Popov

Fix delayed early bind if class already exists

We should not try to perform a delayed early bind if the class has
already been declared. This matches the behavior of an ordinary
earl

Fix delayed early bind if class already exists

We should not try to perform a delayed early bind if the class has
already been declared. This matches the behavior of an ordinary
early bind.

show more ...

# ddaf64b5 14-Oct-2021 Dmitry Stogov

Avoid non-immutable map_ptr indirection

# c19977d0 27-Sep-2021 Nikita Popov

Fix delayed early binding with optimization

It's possible for delayed early binding opcodes to get optimized
away if they are "unreachable". However, we still need to attempt
early b

Fix delayed early binding with optimization

It's possible for delayed early binding opcodes to get optimized
away if they are "unreachable". However, we still need to attempt
early binding for them. (In some cases we also corrupt the early
binding list outright during optimization, which is how I got here.)

Fix this by storing information about delayed early binding
independently of DECLARE_CLASS_DELAYED opcodes, so early binding is
performed even after the opcode has been dropped.

show more ...

# ccff3d93 14-Sep-2021 Nikita Popov

Merge branch 'PHP-8.1'

* PHP-8.1:
Fix func/class name use after free on opcache OOM condition


# e7de9b20 14-Sep-2021 Nikita Popov

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Fix func/class name use after free on opcache OOM condition


# 10e9f6b3 14-Sep-2021 Nikita Popov

Fix func/class name use after free on opcache OOM condition

This can occur on opcache OOM conditions, where the function/class
names are not interned and the script does not get cached.

Fix func/class name use after free on opcache OOM condition

This can occur on opcache OOM conditions, where the function/class
names are not interned and the script does not get cached. In
that case the functions/classes get transferred from the persistent
script to the global tables, without incrementing the key refcount.
To mirror that, we should also not try to free the keys when freeing
the persistent script. For this by setting the number of elements
to zero, which will free only the hashtable structure itself.

show more ...

# d9e5c6b0 14-Sep-2021 Nikita Popov

Free recorded warnings if script not cached

# ae8647d9 20-Jul-2021 Levi Morrison

Remove leading underscore for _zend_hash_find_known_hash (#7260)

Convert zend_hash_find_ex(..., 1) to zend_hash_find_known_hash(...)
Convert zend_hash_find_ex(..., 0) to zend_hash_find(.

Remove leading underscore for _zend_hash_find_known_hash (#7260)

Convert zend_hash_find_ex(..., 1) to zend_hash_find_known_hash(...)
Convert zend_hash_find_ex(..., 0) to zend_hash_find(...)

Also add serializable changes to UPGRADING.INTERNALS summary

show more ...

# 01b3fc03 06-May-2021 KsaR

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |

show more ...

# 0fc3818c 13-Apr-2021 Dmitry Stogov

Initialize fast class cache

# 65859fe1 11-Mar-2021 Dmitry Stogov

Inheritance cache optimization

# 47a2e5c7 18-May-2020 Nikita Popov

Reference dynamic functions through dynamic_defs

Currently, dynamically declared functions and closures are inserted
into the function table under a runtime definition key, and then late

Reference dynamic functions through dynamic_defs

Currently, dynamically declared functions and closures are inserted
into the function table under a runtime definition key, and then later
possibly renamed. When opcache is not used and a file containing a
closure is repeatedly included, this leads to a very large memory leak,
as the no longer needed closure declarations will never be freed
(https://bugs.php.net/bug.php?id=76982).

With this patch, dynamic functions are instead stored in a
dynamic_func_defs member on the op_array, which opcodes reference
by index. When the parent op_array is destroyed, the dynamic_func_defs
it contains are also destroyed (unless they are stilled used elsewhere,
e.g. because they have been bound, or are used by a live closure). This
resolves the fundamental part of the leak, though doesn't completely
fix it yet due to some arena allocations.

The main non-obvious change here is to static variable handling:
We can't destroy static_variables_ptr in destroy_op_array, as e.g.
that would clear the static variables in a dynamic function when
the op_array containing it is destroyed. Static variable destruction
is separated out for this reason (we already do static variable
destruction separately for normal functions, so we only need to
handle main scripts).

Closes GH-5595.

show more ...

# 5d160e30 17-Feb-2021 Nikita Popov

Fix static variable behavior with inheritance

When a method is inherited, the static variables will now always
use the initial values, rather than the values at the time of
inheritan

Fix static variable behavior with inheritance

When a method is inherited, the static variables will now always
use the initial values, rather than the values at the time of
inheritance. As such, behavior no longer depends on whether
inheritance happens before or after a method has been called.

This is implemented by always keeping static_variables as the
original values, and static_variables_ptr as the modified copy.

Closes GH-6705.

show more ...

# 4b79dba9 09-Feb-2021 Dmitry Stogov

Added Inheritance Cache.

This is a new transparent technology that eliminates overhead of PHP class inheritance.

PHP classes are compiled and cached (by opcahce) separately, howeve

Added Inheritance Cache.

This is a new transparent technology that eliminates overhead of PHP class inheritance.

PHP classes are compiled and cached (by opcahce) separately, however their "linking" was done at run-time - on each request. The process of "linking" may involve a number of compatibility checks and borrowing methods/properties/constants form parent and traits. This takes significant time, but the result is the same on each request.

Inheritance Cache performs "linking" for unique set of all the depending classes (parent, interfaces, traits, property types, method types involved into compatibility checks) once and stores result in opcache shared memory. As a part of the this patch, I removed limitations for immutable classes (unresolved constants, typed properties and covariant type checks). So now all classes stored in opcache are "immutable". They may be lazily loaded into process memory, if necessary, but this usually occurs just once (on first linking).

The patch shows 8% improvement on Symphony "Hello World" app.

show more ...

# b3bbb8fe 19-Jan-2021 Dmitry Stogov

Mark classes cached by opcache by ZEND_ACC_CACHED flag and prevent useless copying and desrpoying of immutable data.

# aa16aee5 12-Jan-2021 Dmitry Stogov

Cleanup:

- ZCG(bind_hash) is not used anymore
- zend_accel_function_hash_copy() and zend_accel_function_hash_copy_from_shm() are the same
- zend_accel_class_hash_copy() and zend_acce

Cleanup:

- ZCG(bind_hash) is not used anymore
- zend_accel_function_hash_copy() and zend_accel_function_hash_copy_from_shm() are the same
- zend_accel_class_hash_copy() and zend_accel_class_hash_copy_from_shm() are almost the same

show more ...

# 1314ccbf 26-Jun-2020 Nikita Popov

Cache __unserialize() instead of unserialize()

We should use these cache slots for the new object serialization
mechanism rather than the old one.

12345678