History log of /php-src/Zend/zend_globals.h (Results 1 – 25 of 346)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 9bbc195d 23-Apr-2024 Arnaud Le Blanc

Remove zend_strtod mutex (#13974)

`zend_strtod.c` uses a global state (mostly an allocation freelist) protected by a mutex in ZTS builds. This state is used by `zend_dtoa()`, `zend_strtod()`

Remove zend_strtod mutex (#13974)

`zend_strtod.c` uses a global state (mostly an allocation freelist) protected by a mutex in ZTS builds. This state is used by `zend_dtoa()`, `zend_strtod()`, and variants. This creates a lot of contention in concurrent loads. `zend_dtoa()` is used to format floats to string, e.g. in sprintf, json_encode, serialize, uniqid.

Here I move the global state to the thread specific `executor_globals` and remove the mutex.

The impact on non-concurrent environments is null or negligible, but there is a considerable speed up on concurrent environments, especially on Alpine/Musl.

show more ...


# 6a6e91f3 22-Mar-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Shrink some commonly used structs by reordering members (#10880)

Struct members require some alignment based on their type. This means
that if a struct member is not aligned, there will

Shrink some commonly used structs by reordering members (#10880)

Struct members require some alignment based on their type. This means
that if a struct member is not aligned, there will be a hole created by
the compiler in the struct, which is wasted space. This patch reorders
some of the most commonly used structs, but in such a way that the
fields which were in the same cache line still belong together.
The only exception to this is exception_ignore_args, which was
temporally not close to nearby members, and as such I placed
it further up to close a hole.

On 64-bit Linux this gives us the following shrinks:
* zend_op_array: 248 -> 240
* zend_ssa_var: 56 -> 48
* zend_ssa_var_info: 48 -> 40
* php_core_globals: 672 -> 608
* zend_executor_globals: 1824 -> 1792

On 32-bit, the sizes will either remain the same or will result in
smaller shrinks.

show more ...


# ad85e714 03-Mar-2023 Kévin Dunglas

fix: support for timeouts with ZTS on Linux (#10141)


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


# bb07e202 21-Feb-2023 Max Kellermann

Two `enum`s instead of preprocessor macros (#10617)

* Zend/zend_compile: convert `memoize_mode` macros to enum

* Zend/zend_stack: convert `ZEND_STACK_APPLY_*` macros to enum


# bf036fa2 18-Feb-2023 Max Kellermann

Zend/zend_globals: convert fiber_stack_size to `size_t` (#10619)

`zend_long` is a signed integer that's only 32 bit on some 64 bit
architectures (e.g. ARM64). The proper type for memory

Zend/zend_globals: convert fiber_stack_size to `size_t` (#10619)

`zend_long` is a signed integer that's only 32 bit on some 64 bit
architectures (e.g. ARM64). The proper type for memory sizes is
`size_t`, and this type is accepted by zend_fiber_init_context().

show more ...


# 3b75f07c 13-Feb-2023 Dmitry Stogov

Stop copying internal functions into each thread (#10517)

* Stop copying internal functions into each thread

It seems we don't copy internal methods for a long time, so this
sho

Stop copying internal functions into each thread (#10517)

* Stop copying internal functions into each thread

It seems we don't copy internal methods for a long time, so this
shouldn't be a problem. We had to copy functions in PHP-5 times, but it
seems we just forgot to remove this.

It's possible that some third-part extensions (e.g. profilers, tracers,
debuggers) modify internal functions. After this change that may cause
race conditions in ZTS build (but we already jave the same behavior for
internal methods). Observer API should provide necesssary functionality
to avoid shared structures modification.

* Remove unused function

show more ...


# 2d662f32 03-Jan-2023 Max Kellermann

Zend/zend_ini_scanner: parse const strings


# a11c8a30 16-Dec-2022 Arnaud Le Blanc

Limit stack size (#9104)


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
# ef39adb6 14-Aug-2022 twosee

Merge branch 'PHP-8.1'

* PHP-8.1:
Re-fix GH-8409: SSL handshake timeout persistent connections hanging
Revert "Fix GH-8409: SSL handshake timeout persistent connections hanging"


# 897ca85d 09-Aug-2022 Jakub Zelenka

Revert "Fix GH-8409: SSL handshake timeout persistent connections hanging"

This reverts commit d0527427be57957157aec5e26a28899b380140df.

This patch makes Swoole/Swow can not work an

Revert "Fix GH-8409: SSL handshake timeout persistent connections hanging"

This reverts commit d0527427be57957157aec5e26a28899b380140df.

This patch makes Swoole/Swow can not work anymore, because Coroutine will yield to another one during socket operation, EG(record_errors) assertion will always fail, and zend_begin_record_errors() was only used during compile time before.
Note: zend_emit_recorded_errors() and the typo fix are reserved.

show more ...

# 438f692e 12-Aug-2022 Jakub Zelenka

Merge branch 'PHP-8.1'


# d0527427 09-Aug-2022 Jakub Zelenka

Fix GH-8409: SSL handshake timeout persistent connections hanging

This is not actually related to SSL handshake but stream socket creation
which does not clean errors if the error handle

Fix GH-8409: SSL handshake timeout persistent connections hanging

This is not actually related to SSL handshake but stream socket creation
which does not clean errors if the error handler is set. This fix
prevents emitting errors until the stream is freed.

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, 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
# 280fd680 01-Jun-2022 Levi Morrison

Make vm_interrupt and timed_out atomic (#8327)

This is done by adding a new zend_atomic_bool type. The type
definition is only available for compiler alignment and size info; it
shou

Make vm_interrupt and timed_out atomic (#8327)

This is done by adding a new zend_atomic_bool type. The type
definition is only available for compiler alignment and size info; it
should be treated as opaque and only the zend_atomic_bool_* family of
functions should be used.

Note that directly using atomic_bool is complicated. All C++ compilers
stdlibs that I checked typedef atomic_bool to std::atomic<bool>, which
can't be used in an extern "C" section, and there's at least one usage
of this in core, and probably more outside of it.

So, instead use platform specific functions, preferring compiler
intrinsics.

show more ...

Revision tags: 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
# e3ef7bbb 05-Feb-2022 Ilija Tovilo

Adjust filename/lineno for constant expressions

Closes GH-7771
Closes GH-8124

Revision tags: 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, 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, php-8.1.0RC4, php-8.0.12RC1, php-7.4.25RC1, php-8.1.0RC3, php-8.0.11, php-7.4.24, php-7.3.31, php-8.1.0RC2, php-7.4.24RC1, php-8.0.11RC1, php-8.1.0RC1
# 6434c93a 26-Aug-2021 Nikita Popov

Explicitly store real map ptr base

If we only store the biased pointer, the map ptr region will not
be recognized as reachable memory by leak checkers. This is
primarily problematic

Explicitly store real map ptr base

If we only store the biased pointer, the map ptr region will not
be recognized as reachable memory by leak checkers. This is
primarily problematic for fuzzing, because this is persistent
memory that may be reallocated during the request, without being
an actual leak.

Avoid this by simply storing both the real base pointer of the
allocation, as well as the biased base pointer used for accesses.

show more ...

Revision tags: 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, 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
# e6e6b3e6 11-Jun-2021 Aaron Piotrowski

Improve fiber interoperability (#7128)

Revision tags: php-8.1.0alpha1
# a65989b1 05-Jun-2021 Martin Schröder <53789145+kooldev@users.noreply.github.com>

Alternative Fiber Internals Refactoring (#7101)

Revision tags: php-8.0.7, php-7.4.20
# 2c0b4c8d 26-May-2021 twosee

Remove the redefinition of zend_error_info (#7044)

It causes -Wtypedef-redefinition warning.

Revision tags: php-8.0.7RC1, php-7.4.20RC1
# ccc069d0 06-May-2021 Aaron Piotrowski

Catch and repeat zend_bailout in fibers

This removes switching to main for fatal errors in fibers in favor of catching any zend_bailout in a fiber and calling zend_bailout again after switch

Catch and repeat zend_bailout in fibers

This removes switching to main for fatal errors in fibers in favor of catching any zend_bailout in a fiber and calling zend_bailout again after switching to the previous fiber or {main}.

show more ...

Revision tags: php-8.0.6, php-7.4.19
# dd86987b 29-Apr-2021 Nikita Popov

Replay warnings during inheritance (#6928)

Since 3e6b447979a2b1f351faf40bee9c6cf7e362d85a it is again possible to have
warnings (deprecations) during inheritance, and more such functiona

Replay warnings during inheritance (#6928)

Since 3e6b447979a2b1f351faf40bee9c6cf7e362d85a it is again possible to have
warnings (deprecations) during inheritance, and more such functionality is
likely in the future. This is a problem, because such warnings will only be
shown on the first request if the opcache inheritance cache is used. This
currently causes test failures in --repeat builds.

Fix this by uplifting the error recording functionality from opcache to Zend,
and then using it to persist a warning trace in the inheritance cache, which
can then be used to replay the warnings on subsequent executions.

show more ...

# e8e7c04a 29-Apr-2021 Nikita Popov

Use common struct to store error information

This is needed by both fibers and opcache (and GH-6903 also uses it),
so make it a common structure that can be used by any functionality

Use common struct to store error information

This is needed by both fibers and opcache (and GH-6903 also uses it),
so make it a common structure that can be used by any functionality
storing warnings/errors.

show more ...

Revision tags: php-7.4.18, php-7.3.28, php-8.0.5
# c276c16b 26-Apr-2021 Aaron Piotrowski

Implement Fibers

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

Closes GH-6875.

Revision tags: php-8.0.5RC1, php-7.4.18RC1
# 462da6e0 31-Mar-2021 Josh Soref

Fix spelling and grammar mistakes

This PR corrects misspellings identified by the check-spelling action.

The misspellings have been reported at jsoref@b6ba3e2#commitcomment-48946465

Fix spelling and grammar mistakes

This PR corrects misspellings identified by the check-spelling action.

The misspellings have been reported at jsoref@b6ba3e2#commitcomment-48946465

The action reports that the changes in this PR would make it happy: jsoref@602417c

Closes GH-6822.

show more ...

# c732ab40 16-Mar-2021 Dmitry Stogov

Change Zend Stream API to use zend_string* instead of char*.

This allows to eliminate re-calculation of string lenght and hash value.
See the detailed list of changes in UPGRADING.INTERN

Change Zend Stream API to use zend_string* instead of char*.

This allows to eliminate re-calculation of string lenght and hash value.
See the detailed list of changes in UPGRADING.INTERNALS.

show more ...

12345678910>>...14