#
3fbca7fb |
| 24-Jun-2024 |
Arnaud Le Blanc |
Support sysconf(_SC_GETPW_R_SIZE_MAX) == -1 (#13922)
|
#
c3acfb1b |
| 10-Apr-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix GH-13931: Applying zero offset to null pointer in Zend/zend_opcode.c In the test cases, the compiler bails out due to a fatal error. The data structures used by the compiler will con
Fix GH-13931: Applying zero offset to null pointer in Zend/zend_opcode.c In the test cases, the compiler bails out due to a fatal error. The data structures used by the compiler will contain stale values. In particular, for the test case CG(loop_var_stack) will contain data. The next compilation will incorrectly use elements from the previous stack. To solve this, we reset part of the compiler data structures. We don't do a full re-initialization via init_compiler() because that will also reset streams and resources. Closes GH-13938.
show more ...
|
#
2cde4b2e |
| 15-Jan-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix GH-13097: Anonymous class reference in trigger_error / thrown Exception Closes GH-13153.
|
#
d8e866da |
| 20-Nov-2023 |
Ilija Tovilo |
Fix in-place modification of filename in php_message_handler_for_zend php_strip_url_passwd modifies url in-place. We cannot assume from php_message_handler_for_zend that data is a tempor
Fix in-place modification of filename in php_message_handler_for_zend php_strip_url_passwd modifies url in-place. We cannot assume from php_message_handler_for_zend that data is a temporary, modifiable string. Fixes oss-fuzz #64209 Closes GH-12733
show more ...
|
#
0311e60e |
| 04-Aug-2023 |
Levi Morrison |
Add php_version and php_version_id PHPAPI funcs (#11875) Mostly, extensions will use `PHP_VERSION` and `PHP_VERSION_ID` respectfully but sometimes they want to grab the version at run-ti
Add php_version and php_version_id PHPAPI funcs (#11875) Mostly, extensions will use `PHP_VERSION` and `PHP_VERSION_ID` respectfully but sometimes they want to grab the version at run-time rather than at compile-time. For example, extensions which distribute pre-built binaries may want this.
show more ...
|
#
d5ad7510 |
| 08-Jun-2023 |
George Peter Banyard |
More usage of known zend_str instead of C string (#11381)
|
#
ac5920f9 |
| 29-Apr-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix GH-11141: Could not open input file: should be sent to stderr I grepped for php_printf cases in main/ and sapi/ and converted the cases which clearly indicate errors to fprintf(stder
Fix GH-11141: Could not open input file: should be sent to stderr I grepped for php_printf cases in main/ and sapi/ and converted the cases which clearly indicate errors to fprintf(stderr, ...), like suggested in the linked issue. Closes GH-11163.
show more ...
|
#
732d92c0 |
| 28-Apr-2023 |
Javier Eguiluz |
[skip ci] Fix various typos and grammar issues (#11143)
|
#
51faf04d |
| 15-Mar-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix GH-10737: PHP 8.1.16 segfaults on line 597 of sapi/apache2handler/sapi_apache2.c The TSRM keeps a hashtable mapping the thread IDs to the thread resource pointers. It's possible that
Fix GH-10737: PHP 8.1.16 segfaults on line 597 of sapi/apache2handler/sapi_apache2.c The TSRM keeps a hashtable mapping the thread IDs to the thread resource pointers. It's possible that the thread disappears without us knowing, and then another thread gets spawned some time later with the same ID as the disappeared thread. Note that since it's a new thread the TSRM key pointer and cached pointer will be NULL. The Apache request handler `php_handler()` will try to fetch some fields from the SAPI globals. It uses a lazy thread resource allocation by calling `ts_resource(0);`. This allocates a thread resource and sets up the TSRM pointers if they haven't been set up yet. At least, that's what's supposed to happen. But since we are in a situation where the thread ID still has the resources of the *old* thread associated in the hashtable, the loop in `ts_resource_ex` will find that thread resource and assume the thread has been setup already. But this is not the case since this thread is actually a new thread, just reusing the ID of the old one, without any relation whatsoever to the old thread. Because of this assumption, the TSRM pointers will not be setup, leading to a NULL pointer dereference when trying to access the SAPI globals. We can easily detect this scenario: if we're in the fallback path, and the pointer is NULL, and we're looking for our own thread resource, we know we're actually reusing a thread ID. In that case, we'll free up the old thread resources gracefully (gracefully because there might still be resources open like database connection which need to be shut down cleanly). After freeing the resources, we'll create the new resources for this thread as if the stale resources never existed in the first place. From that point forward, it is as if that situation never occurred. The fact that this situation happens isn't that bad because a child process containing threads will eventually be respawned anyway by the SAPI, so the stale thread resources won't remain forever. Note that we can't simply assign our own TSRM pointers to the existing thread resource for our ID, since it was actually from a different thread (just with the same ID!). Furthermore, the dynamically loaded extensions have their own pointer, which is only set when their constructor is called, so we'd have to call their constructor anyway... I also tried to call the dtor and then the ctor again for those resources on the pre-existing thread resource to reuse storage, but that didn't work properly because other code doesn't expect something like that to happen, which breaks assumptions, and this in turn caused Valgrind to (rightfully) complain about memory bugs. Note 2: I also had to fix a bug in the core globals destruction because it always assumed that the thread destroying them was the owning thread, which on TSRM shutdown isn't always the case. A similar bug was fixed recently with the JIT globals. Closes GH-10863.
show more ...
|
#
c9d728cb |
| 04-Apr-2023 |
Dmitry Stogov |
Revert "Zend/zend_types.h: move `zend_rc_debug` to `zend_rc_debug.h`" This reverts commit d6e95041e291f1f41e1da43e616c6354705464d3.
|
#
9d5f2f13 |
| 20-Mar-2023 |
Ilija Tovilo |
Use new ZSTR_INIT_LITERAL macro (#10879)
|
#
4da0da7f |
| 17-Mar-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Implement GH-10854: TSRM should set a smarter value for expected_threads (#10867) The tsrm_startup() function is currently always called with expected_threads = 1. This means that the ha
Implement GH-10854: TSRM should set a smarter value for expected_threads (#10867) The tsrm_startup() function is currently always called with expected_threads = 1. This means that the hashtable used in the TSRM will only contain a single bucket, and all thread resources will therefore be in the same linked list. So it's not really a hashtable right now, even though it's supposed to be. This patch adds a function tsrm_startup_ex() which takes the expected thread count as an argument. It also keeps the tsrm_startup() function so there are no BC breaks. In the Apache SAPI we query how many threads we have, and pass that to the tsrm_startup_ex() function.
show more ...
|
#
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 ...
|
#
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 ...
|
#
413844d6 |
| 18-Feb-2023 |
Max Kellermann |
Zend/zend_types.h: deprecate zend_bool, zend_intptr_t, zend_uintptr_t (#10597) These types are standard C99. For compatibility with out-of-tree extensions, keep the typedefs in
Zend/zend_types.h: deprecate zend_bool, zend_intptr_t, zend_uintptr_t (#10597) These types are standard C99. For compatibility with out-of-tree extensions, keep the typedefs in main/php.h.
show more ...
|
#
716de0cf |
| 19-Jan-2023 |
Jakub Zelenka |
Introduce max_multipart_body_parts INI This fixes GHSA-54hq-v5wp-fqgv DOS vulnerabality by limitting number of parsed multipart body parts as currently all parts were always parsed.
|
#
cc931af3 |
| 30-Dec-2022 |
Jakub Zelenka |
Fix GH-8086: Introduce mail.mixed_lf_and_crlf INI When this INI option is enabled, it reverts the line separator for headers and message to LF which was a non conformant behavior in PHP
Fix GH-8086: Introduce mail.mixed_lf_and_crlf INI When this INI option is enabled, it reverts the line separator for headers and message to LF which was a non conformant behavior in PHP 7. It is done because some non conformant MTAs fail to parse CRLF line separator for headers and body. This is used for mail and mb_send_mail functions.
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 ...
|
#
16203b53 |
| 04-Jan-2023 |
Max Kellermann |
main: add missing includes
|
#
77ee92a5 |
| 28-Nov-2022 |
Jorg Adam Sowa |
Remove unnecessary usage of CONST_CS Closes GH-9685.
|
#
1d6b32f6 |
| 21-Oct-2022 |
Ilija Tovilo |
Remove unnecessary ast eval bailout We can just reset the filename_override to NULL in php_request_shutdown. Closes GH-9805
|
#
66f3b5ff |
| 12-Oct-2022 |
Máté Kocsis |
Declare main constants in stubs - part 3 (#9731)
|
#
93982b14 |
| 30-Sep-2022 |
Máté Kocsis |
Declare main constants in stubs - part 1 (#9616)
|
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, 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 |
|
#
3503b1da |
| 26-Jun-2022 |
Jakub Zelenka |
Fix bug #77780: "Headers already sent" when previous connection was aborted This change primarily splits SAPI deactivation to module and destroy parts. The reason is that currently some
Fix bug #77780: "Headers already sent" when previous connection was aborted This change primarily splits SAPI deactivation to module and destroy parts. The reason is that currently some SAPIs might bail out on deactivation. One of those SAPI is PHP-FPM that can bail out on request end if for example the connection is closed by the client (web sever). The problem is that in such case the resources are not freed and some values reset. The most visible impact can have not resetting the PG(headers_sent) which can cause erorrs in the next request. One such issue is described in #77780 bug which this fixes and is also cover by a test in this commit. It seems reasonable to separate deactivation and destroying of the resource which means that the bail out will not impact it.
show more ...
|
Revision tags: 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, 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, 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, php-8.1.0alpha1, php-8.0.7, php-7.4.20, php-8.0.7RC1, php-7.4.20RC1, php-8.0.6, php-7.4.19, php-7.4.18, php-7.3.28, php-8.0.5, php-8.0.5RC1, php-7.4.18RC1, php-8.0.4RC1, php-7.4.17RC1, 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, php-7.4.6, php-7.2.31, php-7.4.6RC1, php-7.3.18RC1, 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, php-7.4.4RC1, php-7.3.16RC1, php-7.4.3, php-7.2.28, php-7.3.15RC1, php-7.4.3RC1, php-7.3.15, php-7.2.27, php-7.4.2, php-7.3.14, php-7.3.14RC1, php-7.4.2RC1, php-7.4.1, php-7.2.26, php-7.3.13, php-7.4.1RC1, php-7.3.13RC1, php-7.2.26RC1, php-7.4.0, php-7.2.25, php-7.3.12, php-7.4.0RC6, php-7.3.12RC1, php-7.2.25RC1, php-7.4.0RC5 |
|
#
09237f61 |
| 26-Oct-2019 |
Eric Norris |
Update request startup error messages
|