History log of /PHP-8.3/Zend/zend.c (Results 1 – 25 of 829)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1f35e2a9 09-Sep-2024 Ilija Tovilo

Fix uninitialized CG(zend_lineno)

Closes GH-15813


# b9fdc0bd 09-Sep-2024 Ilija Tovilo

Fix uninitialized EG(user_error_handler_error_reporting)

Closes GH-15812


# 3301d960 12-Mar-2024 Ilija Tovilo

Restore error handler after running it

Symfony relies on finding the exception handler in the handler stack. There's
currently no clean API to find it, so they pop all the handlers, and

Restore error handler after running it

Symfony relies on finding the exception handler in the handler stack. There's
currently no clean API to find it, so they pop all the handlers, and push them
again once the stack is empty. This PR attempts to minimize the BC break by
pushing the current handler onto the stack and clearing the current handler, and
restoring it once it has finished. This is essentially equivalent to
set_exception_handler(null) and restore_exception_handler().

restore_exception_handler() however is only called if the exception handler is
still unset. If the handler has pushed a new handler in the meantime, we assume
it knows what it's doing.

Fixes GH-13446
Closes GH-13686

show more ...


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


# fe3a819e 01-Nov-2023 Dmitry Stogov

Fixed GH-12564: The negative fiber.stack_size setting leads to crash


# 53aa53f4 24-Aug-2023 Jakub Zelenka

Introduce Zend guard recursion protection

This PR introduces a new way of recursion protection in JSON, var_dump
and friends. It fixes issue in master for __debugInfo and also improves

Introduce Zend guard recursion protection

This PR introduces a new way of recursion protection in JSON, var_dump
and friends. It fixes issue in master for __debugInfo and also improves
perf for jsonSerializable in some cases. More info can be found in
GH-10020.

Closes GH-11812

show more ...


# 96885bc0 05-Aug-2023 Kévin Dunglas

fix: handle the GNU specific version of strerror_r

Close GH-11882


# 127ad707 24-Jul-2023 Ilija Tovilo

Fix open_basedir leak

Fixes oss-fuzz #60741
Closes GH-11780


# 9bcdf219 31-Mar-2023 Ilija Tovilo

Resolve open_basedir paths on ini update

Closes GH-10987


# d0731934 16-Jul-2023 Arnaud Le Blanc

Expose time spent collecting cycles in gc_status() (#11523)


# b3e33be4 21-Mar-2023 Ilija Tovilo

Forward shutdown exceptions to user error handlers

Fixes GH-10695
Closes GH-110905


# 99fa740a 06-Jun-2023 George Peter Banyard

Use common function for TypeError on illegal offset access (#10544)

This merges all usages of emitting an offset TypeError into a new ZEND_API function
zend_illegal_container_offset(cons

Use common function for TypeError on illegal offset access (#10544)

This merges all usages of emitting an offset TypeError into a new ZEND_API function
zend_illegal_container_offset(const zend_string* container, const zval *offset, int type);

Where the container should represent the type on which the access is attempted (e.g. string, array)
The offset zval that is used, where the error message will display its type
The type of access, which should be a BP_VAR_* constant, to get special message for isset/empty/unset

show more ...


# 4c38a79f 20-Apr-2023 Ilija Tovilo

Fix incorrect CG(memoize_mode) state after bailout in ??=

Fixes GH-11108
Closes GH-11109


# c9d728cb 04-Apr-2023 Dmitry Stogov

Revert "Zend/zend_types.h: move `zend_rc_debug` to `zend_rc_debug.h`"

This reverts commit d6e95041e291f1f41e1da43e616c6354705464d3.


# 6f1e5ff8 10-Mar-2023 Ilija Tovilo

Fix GC_BENCH flag (#10823)

zend_gc_globals is now hidden, so we can't access it from zend.c.


# ff62d117 04-Mar-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-8646: Memory leak PHP FPM 8.1

Fixes GH-8646
See https://github.com/php/php-src/issues/8646 for thorough discussion.

Interned strings that hold class entries can get a cor

Fix GH-8646: Memory leak PHP FPM 8.1

Fixes GH-8646
See https://github.com/php/php-src/issues/8646 for thorough discussion.

Interned strings that hold class entries can get a corresponding slot in map_ptr for the CE cache.
map_ptr works like a bump allocator: there is a counter which increases to allocate the next slot in the map.

For class name strings in non-opcache we have:
- on startup: permanent + interned
- on request: interned
For class name strings in opcache we have:
- on startup: permanent + interned
- on request: either not interned at all, which we can ignore because they won't get a CE cache entry
or they were already permanent + interned
or we get a new permanent + interned string in the opcache persistence code

Notice that the map_ptr layout always has the permanent strings first, and the request strings after.
In non-opcache, a request string may get a slot in map_ptr, and that interned request string
gets destroyed at the end of the request. The corresponding map_ptr slot can thereafter never be used again.
This causes map_ptr to keep reallocating to larger and larger sizes.

We solve it as follows:
We can check whether we had any interned request strings, which only happens in non-opcache.
If we have any, we reset map_ptr to the last permanent string.
We can't lose any permanent strings because of map_ptr's layout.

Closes GH-10783.

show more ...


# ad85e714 03-Mar-2023 Kévin Dunglas

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


# d6e95041 13-Jan-2023 Max Kellermann

Zend/zend_types.h: move `zend_rc_debug` to `zend_rc_debug.h`

`zend_rc_debug` is not a type and does not really belong in
`zend_types.h`; this allows using `ZEND_RC_MOD_CHECK()` without

Zend/zend_types.h: move `zend_rc_debug` to `zend_rc_debug.h`

`zend_rc_debug` is not a type and does not really belong in
`zend_types.h`; this allows using `ZEND_RC_MOD_CHECK()` without
including the huge `zend_types.h` header and allows decoupling
circular header dependencies.

show more ...


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


# c8955c07 16-Jan-2023 Christoph M. Becker

Revert GH-10220

Cf. <https://github.com/php/php-src/pull/10220#issuecomment-1383739816>.

This reverts commit ecc880f491d66081298a16634629f149459706a9.
This reverts commit 588a07

Revert GH-10220

Cf. <https://github.com/php/php-src/pull/10220#issuecomment-1383739816>.

This reverts commit ecc880f491d66081298a16634629f149459706a9.
This reverts commit 588a07f7371ee2b5fac17de147926780e427fae6.
This reverts commit f377e15751d3aa48b69cd9bcc366ede7803d511f.
This reverts commit b4ba16fe189b109144aff669e11d81365160104b.
This reverts commit 694ec1deea36e366b28b6349a52be49824e1a1a8.
This reverts commit 6b34de8eba9f66882ae16e6073af28783670ac53.
This reverts commit aa1cd02a4367834026ea2205ea13a2f904455aa1.
This reverts commit 308fd311ea6fcf3094b448df7f2b264f08e4fe4f.
This reverts commit 16203b53e1822a37b6ba6f2ab198bb435d05fdad.
This reverts commit 738fb5ca5412f5e833a7fab82b11519e635a3357.
This reverts commit 9fdbefacd3c382d731aa175b7bdc002ec9cb2b30.
This reverts commit cd4a7c1d90562ebb5f89caf94d00d579631b9fbe.
This reverts commit 928685eba2b2f0ded90e7f78fd806ea164002f6e.
This reverts commit 01e5ffc85cd4357fd7b5b7ceefa29f2d10ca26b7.

show more ...


# 694ec1de 04-Jan-2023 Max Kellermann

Zend/zend_{operators,variables}: include cleanup


# a11c8a30 16-Dec-2022 Arnaud Le Blanc

Limit stack size (#9104)


# c4ecd82f 24-Oct-2022 Tyson Andre

Make inspecting SplFixedArray instances more memory efficient/consistent, change print_r null props handling (#9757)

* Make handling of SplFixedArray properties more consistent

Crea

Make inspecting SplFixedArray instances more memory efficient/consistent, change print_r null props handling (#9757)

* Make handling of SplFixedArray properties more consistent

Create a brand new reference counted array every time in SplFixedArray
to be freed by the callers (or return null).
Switch from overriding `get_properties` to overriding `get_properties_for` handler

* Print objects with null hash table like others in print_r

Noticed when working on subsequent commits for SplFixedArray.
Make whether zend_get_properties_for returns null or an empty array
invisible to the end user - it would be always be a non-null array for
user-defined classes.
Always print newlines with `\n\s*(\n\s*)` after objects

Noticed when working on SplFixedArray changes, e.g. in
ext/spl/tests/SplFixedArray__construct_param_null.phpt

show more ...


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


12345678910>>...34