1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 07:28:09 +02:00
Commit Graph

126916 Commits

Author SHA1 Message Date
Ilija Tovilo 82d3a831d2 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-8421: Attributes that target functions are not valid for anonymous functions defined within a method
2022-04-23 11:19:20 +02:00
Ollie Read d0f1b987a5 Fix GH-8421: Attributes that target functions are not valid for anonymous functions defined within a method
Closes GH-8424
2022-04-23 11:16:28 +02:00
Jakub Zelenka abd56aeb9a Merge branch 'PHP-8.0' into PHP-8.1 2022-04-22 23:07:01 +01:00
Jakub Zelenka d8612fb6b7 Fix bug #77023: FPM cannot shutdown processes
This change introduces subsequent kill of the process when idle process quit
(SIGQUIT) does not succeed. It can happen in some situations and means that FPM
is not able to scale down in dynamic pm. Using SIGKILL fixes the issue.
2022-04-22 20:51:02 +01:00
Arnaud Le Blanc f20e11cbe1 Clear recorded errors before executing shutdown functions
Recorded errors may be attached to the wrong cached script when a fatal error
occurs during recording. This happens because the fatal error will cause a
bailout, which may prevent the recorded errors from being freed. If an other
script is compiled after bailout, or if a class is linked after bailout, the
recorded errors will be attached to it.

This change fixes this by freeing recorded errors before executing shutdown
functions.

Fixes GH-8063
2022-04-22 18:14:08 +02:00
Derick Rethans 15ee285f83 Merge branch 'PHP-8.0' into PHP-8.1 2022-04-22 10:31:14 +01:00
Derick Rethans c854bb2472 Fixed GH-8400: bug73837.phpt makes no sense
Replaces the indeed silly test with something that actually does the job,
albeit much slower.
2022-04-22 10:29:37 +01:00
Ilija Tovilo 79eba0231b Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Only check tracked files in verify-generated-files
2022-04-22 00:29:40 +02:00
Ilija Tovilo 1dc6dba014 Only check tracked files in verify-generated-files 2022-04-22 00:28:32 +02:00
Ilija Tovilo cf70047351 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Verify generated files are up to date in CI
2022-04-21 23:27:29 +02:00
Michael Voříšek 36de002cc6 Verify generated files are up to date in CI
Closes GH-8295
2022-04-21 23:25:47 +02:00
Ilija Tovilo 4397811db2 Fix preloading of constants containing enums
Fixes GH-8133
2022-04-21 11:57:12 +02:00
Christoph M. Becker e9b9fec2b2 [ci skip] Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-8408: bug68547.phpt fails without multibyte support
2022-04-20 16:44:11 +02:00
Christoph M. Becker dad5cb442d Fix GH-8408: bug68547.phpt fails without multibyte support 2022-04-20 16:42:09 +02:00
Nikita Popov 18b4e36df1 Move check for named params in fcall optimization earlier
I don't think this is strictly necessary, but I think it makes
sense to check this before interpreting opline->op2.num as an
argument number.

This also adds one more has_known_send_mode() check that I had
missed before.
2022-04-18 18:21:24 +02:00
Nikita Popov 11f950e77e Don't optimize trailing args for prototype fbc 2022-04-18 17:57:16 +02:00
Dmitry Stogov c3a30544ad JIT: Fixed incorrect guard
Fixes oss-fuzz #46704
2022-04-18 11:34:18 +03:00
Alex Dowad 04e59c916f Error handling for UTF-8 complies with WHATWG specification
In 7502c86342, I adjusted the number of error markers emitted on
invalid UTF-8 text to be more consistent with mbstring's behavior on
other text encodings (generally, it emits one error marker for one
unexpected byte). I didn't expect that anybody would actually care one
way or the other, but felt that it was better to be consistent than
not.

Later, Martin Auswöger kindly pointed out that the WHATWG encoding
specification, which governs how various text encodings are handled
by web browsers, does actually specify how many error markers should
be generated for any given piece of invalid UTF-8 text.

Until now, we have never really paid much attention to the WHATWG
specification, but we do want to comply with as many relevant
specifications as possible. And since PHP is commonly used for web
applications, compatibility with the behavior of web browsers is
obviously a good thing.
2022-04-16 15:04:38 +02:00
Nikita Popov b0ab5d0fb0 Don't set ce for by-ref return type
For the case where we upgrade a prototype to a possible by-ref
return from an inheriting method.
2022-04-15 23:55:48 +02:00
Jakub Zelenka a57625374d Merge branch 'PHP-8.0' into PHP-8.1 2022-04-15 22:21:18 +01:00
David Carlier 2f0918c638 Fix FPM socket clean up reallocation clang build warning 2022-04-15 22:20:15 +01:00
David Carlier fc9fecbd09 Fix FPM zlog warning with var being uninitialized 2022-04-15 22:19:36 +01:00
Nikita Popov 4026daee2b Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Move MAY_BE_REF check into COPY_SSA_OBJ_TYPE
2022-04-15 23:14:59 +02:00
Nikita Popov d16d251e20 Move MAY_BE_REF check into COPY_SSA_OBJ_TYPE
ZEND_ASSIGN is not the only place where this is relevant, so
handle it generically inside COPY_SSA_OBJ_TYPE instead.
2022-04-15 23:14:04 +02:00
Nikita Popov 38547b996a Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Don't use CE for by-ref arguments
2022-04-15 23:00:59 +02:00
Nikita Popov 5d072578cd Don't use CE for by-ref arguments 2022-04-15 23:00:43 +02:00
Nikita Popov f1814e6a1f Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Don't use CE info from pi node for MAY_BE_REF var
2022-04-15 22:37:29 +02:00
Nikita Popov 41f33b9dc3 Don't use CE info from pi node for MAY_BE_REF var
Once again, the actual class type may be reassigned indirectly.
2022-04-15 22:36:13 +02:00
Nikita Popov 3fdb1aa14e Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix inference for assignment of known object to reference
2022-04-15 22:15:32 +02:00
Nikita Popov b08aac0451 Fix inference for assignment of known object to reference
We cannot retain the ce information in that case, we have to
assume the ce may change indirectly through the reference.

Fixes oss-fuzz #46720.
2022-04-15 22:14:44 +02:00
Christoph M. Becker 549cf3a24d Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-8366: ArrayIterator may leak when calling __construct()
2022-04-15 19:08:28 +02:00
Christoph M. Becker 1762a87932 Fix GH-8366: ArrayIterator may leak when calling __construct()
When we detach an iterator, we also have to delete it.

Closes GH-8374.
2022-04-15 19:05:18 +02:00
Derick Rethans ec0771c03f Merge branch 'PHP-8.0' into PHP-8.1 2022-04-14 10:32:21 +01:00
Derick Rethans 789f6b8367 Merged pull request #8175 2022-04-14 10:32:18 +01:00
Derick Rethans e38d300a70 Refactor code to avoid duplication 2022-04-14 10:32:10 +01:00
Cody Mann 24085d0192 style/readability updates 2022-04-14 10:22:00 +01:00
Cody Mann 287c8a86b4 GH-7979: iterator advances when checking if valid 2022-04-14 10:22:00 +01:00
Ilija Tovilo d1dc71093f Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix opcache testing in CI
2022-04-14 09:52:07 +02:00
Michael Voříšek e3f2846bbb Fix opcache testing in CI
Closes GH-8350
2022-04-14 09:50:48 +02:00
Ilija Tovilo 914e87e582 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Run nightly on php org only unless triggered via workflow_dispatch
2022-04-14 09:42:11 +02:00
Ilija Tovilo cd90ddca85 Run nightly on php org only unless triggered via workflow_dispatch 2022-04-14 09:35:37 +02:00
Christoph M. Becker c821886777 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix openssl_csr_export() stub
2022-04-13 15:23:09 +02:00
Mikko Pesari 16bf8331e0 Fix openssl_csr_export() stub
Closes GH-8362.
2022-04-13 15:20:58 +02:00
Christoph M. Becker 11231837d7 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix `--EXTENSIONS--` section for two tests in ext/zend_test
2022-04-13 14:46:56 +02:00
Tim Düsterhus 5655f1abe3 Fix --EXTENSIONS-- section for two tests in ext/zend_test
The extension name got broken in e6cf583160.

Closes GH-8357.
2022-04-13 14:45:52 +02:00
Jakub Zelenka 62b676ff0f Merge branch 'PHP-8.0' into PHP-8.1 2022-04-12 23:15:34 +01:00
Jakub Zelenka 33bb201b3e Fix bug #76003: FPM /status reports wrong number of active processe
The fix introduces early locking of scoreboard when it is updated
which prevents the race condition causing an incorrect number of
active processes being set.
2022-04-12 23:12:11 +01:00
Derick Rethans a39a98e3f2 Merge branch 'PHP-8.0' into PHP-8.1 2022-04-12 15:42:18 +01:00
Derick Rethans 07e91ca91c Merge branch 'PHP-7.4' into PHP-8.0 2022-04-12 15:42:10 +01:00
Derick Rethans fbee73df14 Prepare for 7.4.30 2022-04-12 15:41:55 +01:00