History log of /PHP-8.3/ext/opcache/zend_accelerator_util_funcs.c (Results 1 – 25 of 180)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# de7ef3fa 21-Oct-2024 Ilija Tovilo

Fix lineno in function redeclaration error

We were previously using the lineno of the first instruction, rather than the
start of the function itself.

Fixes GH-16509
Closes

Fix lineno in function redeclaration error

We were previously using the lineno of the first instruction, rather than the
start of the function itself.

Fixes GH-16509
Closes GH-16531

show more ...


# 1c30c5e7 18-Apr-2024 Ilija Tovilo

Print location on class redeclaration

Fixes GH-13950
Closes GH-13999


# 692cea5c 13-Sep-2023 Ilija Tovilo

Use zend_error_noreturn for E_ERROR consistently

To be clear, these already don't return. zend_error_noreturn just hints at this
fact through the ZEND_NORETURN attribute.

Closes

Use zend_error_noreturn for E_ERROR consistently

To be clear, these already don't return. zend_error_noreturn just hints at this
fact through the ZEND_NORETURN attribute.

Closes GH-12204

show more ...


# 0600f513 10-May-2023 Ilija Tovilo

Implement delayed early binding for classes without parents

Normally, we add classes without parents (and no interfaces or traits) directly
to the class map, early binding the class. How

Implement delayed early binding for classes without parents

Normally, we add classes without parents (and no interfaces or traits) directly
to the class map, early binding the class. However, if the same class has
already been registered, we would instead just add a ZEND_DECLARE_CLASS
instruction and let the handler throw a duplicate class declaration exception.

However, with opcache, if on the next request the files are included in the
opposite order, we won't perform early binding. To fix this, create a
ZEND_DECLARE_CLASS_DELAYED instruction instead and handle classes without
parents accordingly, skipping any linking for classes that are already linked in
delayed early binding.

Fixes GH-8846

show more ...


# 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 ...


# 722fbd01 05-Feb-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Implement an SSE2 accelerated version of zend_adler32 (#10507)

When benchmarking the file cache of opcache on index.php from a dummy
WordPress install, I noticed that 36.42% of the time

Implement an SSE2 accelerated version of zend_adler32 (#10507)

When benchmarking the file cache of opcache on index.php from a dummy
WordPress install, I noticed that 36.42% of the time was spent in
zend_adler32 to verify the checksums of the files. Callgrind reported
that 332,731,216 instructions were executed during that run and average
time to execute the index file was around 91ms.

This patch implements an SSE2 accelerated version of zend_adler32, which
reduces the number of instructions executed on that bench to
248,600,983, which is a reduction of ~25%. There is also a decrease in
wallclock time measurable: around 10ms. Now only 16.05% of the time is
spent computing checksums.

The benchmark tests were performed using Callgrind, and time for the
wallclock time. These tests were executed multiple times and their
results were averaged. The WordPress install only contains two
almost-blank posts.

show more ...


# 77ee92a5 28-Nov-2022 Jorg Adam Sowa

Remove unnecessary usage of CONST_CS

Closes GH-9685.


# 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 ...


Revision tags: php-8.2.0RC1, php-8.1.10, php-8.0.23
# 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>


Revision tags: php-8.0.23RC1, php-8.1.10RC1, php-8.2.0beta3, php-8.2.0beta2, php-8.1.9, php-8.0.22, php-8.1.9RC1, php-8.2.0beta1, php-8.0.22RC1
# 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 ...


# bccda7eb 01-Aug-2022 Arnaud Le Blanc

Extended map_ptr before copying class table (#9188)

Fixes GH-9164


# a6970838 01-Aug-2022 Arnaud Le Blanc

Extended map_ptr before copying class table (#9188)

Fixes GH-9164


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, 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, php-8.0.14, php-8.1.1, php-7.4.27, php-8.1.1RC1, php-8.0.14RC1, 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, php-7.4.26RC1, php-8.0.13RC1, php-8.1.0RC5, php-7.3.32, php-7.4.25, php-8.0.12
# 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


Revision tags: php-8.1.0RC4, php-8.0.12RC1, php-7.4.25RC1, php-8.1.0RC3
# 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 ...


Revision tags: php-8.0.11, php-7.4.24, php-7.3.31, php-8.1.0RC2
# 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


Revision tags: php-7.4.24RC1, php-8.0.11RC1, php-8.1.0RC1, php-7.4.23, php-8.0.10, php-7.3.30, php-8.1.0beta3, php-8.0.10RC1, php-7.4.23RC1, php-8.1.0beta2, php-8.0.9, php-7.4.22
# 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 ...


Revision tags: php-8.1.0beta1, php-7.4.22RC1, php-8.0.9RC1, php-8.1.0alpha3, php-7.4.21, php-7.3.29, php-8.0.8, php-8.1.0alpha2, php-7.4.21RC1, php-8.0.8RC1, php-8.1.0alpha1, php-8.0.7, php-7.4.20, php-8.0.7RC1, php-7.4.20RC1
# 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 ...


Revision tags: php-8.0.6, php-7.4.19, php-7.4.18, php-7.3.28, php-8.0.5
# 0fc3818c 13-Apr-2021 Dmitry Stogov

Initialize fast class cache


Revision tags: php-8.0.5RC1, php-7.4.18RC1, php-8.0.4RC1, php-7.4.17RC1
# 65859fe1 11-Mar-2021 Dmitry Stogov

Inheritance cache optimization


Revision tags: php-8.0.3, php-7.4.16, php-8.0.3RC1, php-7.4.16RC1, php-8.0.2, php-7.4.15, php-7.3.27, php-8.0.2RC1, php-7.4.15RC2, php-7.4.15RC1, php-8.0.1, php-7.4.14, php-7.3.26, php-7.4.14RC1, php-8.0.1RC1, php-7.3.26RC1, php-8.0.0, php-7.3.25, php-7.4.13, php-8.0.0RC5, php-7.4.13RC1, php-8.0.0RC4, php-7.3.25RC1, php-7.4.12, php-8.0.0RC3, php-7.3.24, php-8.0.0RC2, php-7.4.12RC1, php-7.3.24RC1, php-7.2.34, php-8.0.0rc1, php-7.4.11, php-7.3.23, php-8.0.0beta4, php-7.4.11RC1, php-7.3.23RC1, php-8.0.0beta3, php-7.4.10, php-7.3.22, php-8.0.0beta2, php-7.3.22RC1, php-7.4.10RC1, php-8.0.0beta1, php-7.4.9, php-7.2.33, php-7.3.21, php-8.0.0alpha3, php-7.4.9RC1, php-7.3.21RC1, php-7.4.8, php-7.2.32, php-8.0.0alpha2, php-7.3.20, php-8.0.0alpha1, php-7.4.8RC1, php-7.3.20RC1, php-7.4.7, php-7.3.19, php-7.4.7RC1, php-7.3.19RC1
# 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 ...


12345678