History log of /PHP-8.0/Zend/zend.c (Results 1 – 25 of 760)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 15949b61 07-Mar-2022 Bob Weinand

Fix ZTS build after cherry-pick


# 0d7e10c1 07-Mar-2022 Tim Düsterhus

Fix memory leak of function attribute hash table (#8070)

==109253== 280 (56 direct, 224 indirect) bytes in 1 blocks are definitely lost in loss record 4 of 4
==109253== at 0x4

Fix memory leak of function attribute hash table (#8070)

==109253== 280 (56 direct, 224 indirect) bytes in 1 blocks are definitely lost in loss record 4 of 4
==109253== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==109253== by 0x6D9FA2: __zend_malloc (zend_alloc.c:3068)
==109253== by 0x745138: zend_add_attribute (zend_attributes.c:226)
==109253== by 0x6680D1: zend_add_parameter_attribute (zend_attributes.h:102)
==109253== by 0x66B787: zm_startup_zend_test (test.c:478)
==109253== by 0x7224CD: zend_startup_module_ex (zend_API.c:2202)
==109253== by 0x72252C: zend_startup_module_zval (zend_API.c:2217)
==109253== by 0x734288: zend_hash_apply (zend_hash.c:2011)
==109253== by 0x722C30: zend_startup_modules (zend_API.c:2328)
==109253== by 0x67409B: php_module_startup (main.c:2256)
==109253== by 0x88EDDE: php_cli_startup (php_cli.c:409)
==109253== by 0x890F61: main (php_cli.c:1334)

show more ...


# e6cf5831 12-Feb-2022 Bob Weinand

Fix GH-8082: Prevent leaking memory on observed transient run_time_caches

This is achieved by tracking the observers on the run_time_cache (with a fixed amount of slots, 2 for each observer)

Fix GH-8082: Prevent leaking memory on observed transient run_time_caches

This is achieved by tracking the observers on the run_time_cache (with a fixed amount of slots, 2 for each observer).
That way round, if the run_time_cache is freed all associated observer data is as well.

This approach has been chosen, as to avoid any ABI or API breakage.
Future versions may for example choose to provide a hookable API for run_time_cache freeing or similar.

show more ...


Revision tags: php-8.0.0
# fa713ec1 24-Nov-2020 Nikita Popov

Fixed bug #80362: Running dtrace scripts can cause php to crash

Patch by al at coralnet dot name.


Revision tags: 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
# da0663a3 15-Sep-2020 Nikita Popov

Add GC_TRY_ADDREF macro

That adds a ref if not immutable. Also audit uses of GC_IMMUTABLE
to either use GC_TRY_ADDREF or GC_TRY_PROTECT_RECURSION.


Revision tags: php-7.4.11RC1, php-7.3.23RC1
# 1359a52d 14-Sep-2020 Benjamin Eberlei

Rename zend_error_notify APIs to zend_observer_error*


# bd1d11d3 10-Sep-2020 twosee

Simplify error type filter

Closes GH-6049.


Revision tags: php-8.0.0beta3
# 66c3e900 01-Sep-2020 Levi Morrison

Add zend_observer API

Closes GH-5857.

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
Co-authored-by: Sammy Powers <sammyk@datadoghq.com>


Revision tags: php-7.4.10, php-7.3.22
# fa8d9b11 28-Aug-2020 George Peter Banyard

Improve type declarations for Zend APIs

Voidification of Zend API which always succeeded
Use bool argument types instead of int for boolean arguments
Use bool return type for functio

Improve type declarations for Zend APIs

Voidification of Zend API which always succeeded
Use bool argument types instead of int for boolean arguments
Use bool return type for functions which return true/false (1/0)
Use zend_result return type for functions which return SUCCESS/FAILURE as they don't follow normal boolean semantics

Closes GH-6002

show more ...


# 1b2ec73c 26-Aug-2020 George Peter Banyard

Drop various unused macros/APIs

Also convert_libmagic_pattern() to return a zend_string*

Closes GH-6029


Revision tags: php-8.0.0beta2, php-7.3.22RC1, php-7.4.10RC1
# ee163161 10-Aug-2020 Nikita Popov

Fixed bug #79948

Make sure we don't execute further scripts if one of them encountered
an exit exception.

Also make sure that we free file handles that end up unused due to

Fixed bug #79948

Make sure we don't execute further scripts if one of them encountered
an exit exception.

Also make sure that we free file handles that end up unused due to
an early abort in php_execute_scripts(), which turned up as an
issue in the added test case.

Finally, make use of EG(exit_status) in the places where we
zend_eval_string_ex, instead of unconditionally assigning exit
code 254. If an error occurs, the error handler will already set
exit status 255.

show more ...


Revision tags: 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
# 07db6415 25-Jun-2020 Tyson Andre

[RFC] Make string length for getTraceAsString() configurable

Add a `zend.exception_string_param_max_len` ini setting.
(same suffix as `log_errors_max_len`)

Allow values between

[RFC] Make string length for getTraceAsString() configurable

Add a `zend.exception_string_param_max_len` ini setting.
(same suffix as `log_errors_max_len`)

Allow values between 0 and 1000000 bytes.
For example, with zend.exception_string_param_max_len=0,
"" would represent the empty string, and "..." would represent something
longer than the empty string.
Previously, this was hardcoded as exactly 15 bytes.

Discussion: https://externals.io/message/110717

Closes GH-5769

show more ...


# 1e938e8e 22-Jul-2020 Christoph M. Becker

Fix build

MSVC is pretty picky there, so we add the `ZEND_VOIDP` cast.


# c1a80e07 15-Jul-2020 Christoph M. Becker

Fix minor memory leak of CG(script_encoding_list)

This only leaks at the end of the process, so per se not an issue, but
the leak is caught by MSVC's CRT leak checker, so we better prope

Fix minor memory leak of CG(script_encoding_list)

This only leaks at the end of the process, so per se not an issue, but
the leak is caught by MSVC's CRT leak checker, so we better properly
clean up to avoid false positives.

show more ...


# 6e92487f 22-Jul-2020 twosee

Fix warnings of strict-prototypes

Closes GH-5887.


# e29ee65e 22-Jul-2020 twosee

Export zend_register_error_notify_callback() with ZEND_API


Revision tags: 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, php-7.4.6, php-7.2.31, php-7.4.6RC1, php-7.3.18RC1
# 6c8b94eb 27-Apr-2020 Benjamin Eberlei

Introduce error notification callbacks that are run independant of zend_error_cb


# a3cb6122 09-Jul-2020 Nikita Popov

Revert "Fixed bug #97599 (coredump in set_error_handler)"

This reverts commit ccd41e083359cf6dd264f88806dce4cc49d9358e.

This causes a large performance regression when notices are t

Revert "Fixed bug #97599 (coredump in set_error_handler)"

This reverts commit ccd41e083359cf6dd264f88806dce4cc49d9358e.

This causes a large performance regression when notices are thrown
and large arrays are in scope, see bug #79794.

show more ...


Revision tags: php-7.2.30, php-7.4.5, php-7.3.17, php-7.4.5RC1, php-7.3.17RC1, php-7.3.18, php-7.4.4, php-7.2.29, php-7.3.16
# 75a04eac 06-Mar-2020 Nikita Popov

Make exit() unwind properly

exit() is now internally implemented by throwing an exception,
performing a normal stack unwind and a clean shutdown. This ensures
that no persistent reso

Make exit() unwind properly

exit() is now internally implemented by throwing an exception,
performing a normal stack unwind and a clean shutdown. This ensures
that no persistent resource leaks occur.

The exception is internal, cannot be caught and does not result in
the execution of finally blocks. This may be relaxed in the future.

Closes GH-5768.

show more ...


# 3dfa2583 18-Jun-2020 Nikita Popov

Don't use ternary in ini default

We use sizeof() on ini defaults, so this isn't safe. I can't reproduce
the failures locally, but I expect this to fix the asan jobs.


# 9b3e5792 17-Jun-2020 Nikita Popov

Suppress zend signals check in two readline tests

Installing a callback handler may cause libedit to register new
signals during the request.


# 92c4b065 16-Jun-2020 Christoph M. Becker

Use ZEND_UNREACHABLE() instead of ZEND_ASSERT(0)

Instead of marking unreachable code with `ZEND_ASSERT(0)`, we introduce
`ZEND_UNREACHABLE()`, so that MSVC which does not consider `asser

Use ZEND_UNREACHABLE() instead of ZEND_ASSERT(0)

Instead of marking unreachable code with `ZEND_ASSERT(0)`, we introduce
`ZEND_UNREACHABLE()`, so that MSVC which does not consider `assert(0)`
to mark unreachable code does no longer trigger C4715[1] warnings in
debug builds. This may be useful for other compilers as well.

[1] <https://docs.microsoft.com/de-de/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4715?view=vs-2019>

show more ...


# e56e53a5 09-Jun-2020 Nikita Popov

Back up fake_scope in zend_call_function

We regularly find new places where we forgot to reset fake_scope.
Instead of having to handle this for each caller of zend_call_function()
an

Back up fake_scope in zend_call_function

We regularly find new places where we forgot to reset fake_scope.
Instead of having to handle this for each caller of zend_call_function()
and similar APIs, handle it directly in zend_call_function().

show more ...


# 88355dd3 07-Jun-2020 twosee

Constify char * arguments of APIs

Closes GH-5676.


# 5b4c4bbe 05-Jun-2020 Nikita Popov

Free attribute validators on shutdown


12345678910>>...31