Commit Graph

123385 Commits

Author SHA1 Message Date
Bartosz Gorski
49a20cf3db Removed mentions of git.php.net from the documentation 2021-03-29 14:05:20 +02:00
Kennedy Tedesco
63983e02fe Use ZVAL_TRUE() directly
Just a minor change.
2021-03-29 10:28:23 +02:00
Nuno Maduro
e44f610443 Removes 'Parallel Edition' output in tests
Closes GH-6806.
2021-03-29 00:49:40 +02:00
Jakub Zelenka
4ed4b64df8 Update NEWS and UPGRADING for FPM addition of pm.max_spawn_rate 2021-03-28 21:15:35 +01:00
Jakub Zelenka
4361fffaea Add extra run test for pm.max_spawn_rate 2021-03-28 21:06:45 +01:00
Paulius Sapragonas
eac1609a84 Max spawn child processes rate an once
* Add functionality to expect log config options
2021-03-28 20:53:58 +01:00
Kamil Tekiela
830d385351
Fix typos in fetch_all error message 2021-03-28 20:36:17 +01:00
Levi Morrison
8d743d5281
Revert "Revert "Revert "[skip-ci] Fix typo"""
This reverts commit 2b0f239b21.
2021-03-28 11:53:30 -06:00
Nikita Popov
2b0f239b21 Revert "Revert "[skip-ci] Fix typo""
This reverts commit 046827a7e8.
2021-03-28 18:15:57 +02:00
Nikita Popov
046827a7e8 Revert "[skip-ci] Fix typo"
This reverts commit c730aa26bd.

This looks like the result of a compromised git account. Commit
access has already been revoked.
2021-03-28 11:16:39 +02:00
Rasmus Lerdorf
c730aa26bd [skip-ci] Fix typo
Fixes minor typo.

Signed-off-by: Rasmus Lerdorf <rasmus@lerdorf.com>
2021-03-28 05:57:07 +02:00
Tyson Andre
92aeda524b Fix json_encode regression with JSON_PRETTY_PRINT
This makes the json encoding behavior the same as it was prior to the memory
optimizations added in f9f8c1c79c
(for objects with declared properties)

This is based on the code for the unoptimized case below the changes.

Buggy output prior to this commit:
```
{
"prop":"value"}
```

Correct output:

```
{
    "prop": "value"
}
```

Closes GH-6811
2021-03-27 18:47:54 -04:00
Anatol Belski
e0e3d9851a hash: Fix -Warray-parameter= warnings
Signed-off-by: Anatol Belski <ab@php.net>
2021-03-26 23:29:01 +01:00
Nikita Popov
2c4346f9de Remove unnecessary property unmangling in trait binding
The unmangled name is already available as the hashtable key,
use it directly.
2021-03-26 12:14:32 +01:00
Nikita Popov
5da23eb46c Free static variables in execute fuzzer
Fixes a leak in the seed corpus.
2021-03-26 11:59:14 +01:00
Dmitry Stogov
7b2b9b4079 Improved JIT for TYPE_CHECK opcode 2021-03-25 23:48:08 +03:00
Máté Kocsis
aa45eedef0
Merge branch 'PHP-8.0' 2021-03-25 19:32:21 +01:00
Máté Kocsis
d7ae64627f
Fix PDOStatement::bindColumn() parameter default value 2021-03-25 19:31:04 +01:00
Dmitry Stogov
22fc522483 Improve JIT for IS_IDENTICAL 2021-03-25 17:27:03 +03:00
Dmitry Stogov
2f3538c215 Improved type inference for FE_FETCH_R 2021-03-25 16:00:36 +03:00
George Peter Banyard
56c18c4038 Drop unneessary if branch and adjust arg_num type
This if branch seems to be a remain of when certain type errors where E_WARNINGs, something which isn't the case since PHP 8.0.
2021-03-25 02:12:06 +00:00
Christoph M. Becker
6c89359124 Merge branch 'PHP-8.0'
* PHP-8.0:
  XFAIL on WIN64 because of problem in libffi
2021-03-24 13:58:14 +01:00
Dmitry Stogov
6800f0a3c2 XFAIL on WIN64 because of problem in libffi
(cherry picked from commit 6689bedd17)
2021-03-24 13:57:31 +01:00
Christoph M. Becker
6adec555db Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #73533: Invalid memory access in php_libxml_xmlCheckUTF8
2021-03-24 11:53:53 +01:00
Christoph M. Becker
5832be768c Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #73533: Invalid memory access in php_libxml_xmlCheckUTF8
2021-03-24 11:52:54 +01:00
Christoph M. Becker
498eb8e052 Fix #73533: Invalid memory access in php_libxml_xmlCheckUTF8
A string passed to `php_libxml_xmlCheckUTF8()` may be longer than
1<<31-1 bytes, so we're better using a `size_t`.

Closes GH-6802.
2021-03-24 11:50:50 +01:00
Nikita Popov
74075896e1 Revert "Do not check exact values of unstable metrices in FPM status test"
This reverts commit 5b01c4863f.

The previous commit fixes the 32-bit issue. Maybe this one is also
needed, but let's see if any failures of this form turn up first.
2021-03-24 10:07:56 +01:00
Nikita Popov
9403840ae3 Fix printf type in fpm status 2021-03-24 10:07:53 +01:00
Dmitry Stogov
3e996622c7 Replace function with macro 2021-03-24 10:36:47 +03:00
Jakub Zelenka
5b01c4863f Do not check exact values of unstable metrices in FPM status test 2021-03-23 22:10:30 +00:00
Dmitry Stogov
7adaec1ce8 Move system independent code out from x86 specific header 2021-03-23 17:12:15 +03:00
Dmitry Stogov
c290de157c Move x86 dependent code out from platform independed parts. 2021-03-23 16:39:51 +03:00
Christoph M. Becker
f4412f56a2 Merge branch 'PHP-8.0'
* PHP-8.0:
  Properly initialize PS(mod) on RINIT
2021-03-23 13:14:49 +01:00
Christoph M. Becker
733b514326 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Properly initialize PS(mod) on RINIT
2021-03-23 13:13:43 +01:00
Christoph M. Becker
688e56d0ac Properly initialize PS(mod) on RINIT
We need to do that in case a user handler has been set.  However, we
can't do that in `php_rinit_session_globals()` since that function is
called by PHP function `session_destroy()` too, but in that case we
don't want to reset PS(mod).

Closes GH-6795.
2021-03-23 13:12:19 +01:00
Dmitry Stogov
617276d807 Use capstone disassembler, if available. 2021-03-23 12:39:42 +03:00
Christoph M. Becker
fd62917730 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #80889: amendment
2021-03-22 22:51:12 +01:00
Christoph M. Becker
90be86fc91 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #80889: amendment
2021-03-22 22:49:46 +01:00
Jakub Zelenka
72a22d92cd Fix types in FPM status openmetrics format 2021-03-22 21:32:15 +00:00
Christoph M. Becker
838951c2d6 Fix #80889: amendment
`session_set_save_handler()` may be called with callables instead of an
object; we need to cater to that as well.

We also extract a set_user_save_handler_ini() function to avoid code
duplication.

Closes GH-6796.
2021-03-22 22:17:35 +01:00
Nikita Popov
f42f539324 Revert "Use better function"
This reverts commit 9162116a85.

This causes many "__HALT_COMPILER(); must be declared in a phar"
errors in phar tests on windows.
2021-03-22 17:53:37 +01:00
Max Semenik
56f90492d6 Migrate skip checks to --EXTENSIONS--, p1
For rationale, see https://github.com/php/php-src/pull/6787

Extensions migrated in this part:
* bcmath
* bz2
* calendar
* com_dotnet
* ctype

Closes GH-6797.
2021-03-22 17:51:02 +01:00
Dmitry Stogov
550a662f67 strtr() optimization 2021-03-22 17:37:11 +03:00
Nikita Popov
79a9f809ee Fix const warning 2021-03-22 15:19:06 +01:00
Nikita Popov
6a5d60085d Support VERIFY_RETURN_TYPE elision with unused operand
This handles the degenerate case where SCCP replaced the value in
the RETURN opcode with a constant, but the VERIFY_RETURN is still
there. We can still apply the same optimization, just don't need
to adjust the use list in this case.

The result is still sub-optimal in that a dead QM_ASSIGN is left
behind.
2021-03-22 14:54:29 +01:00
Dmitry Stogov
8ed8cf86a9 Use zend_string* instead of char* 2021-03-22 14:56:16 +03:00
Dmitry Stogov
9162116a85 Use better function 2021-03-22 14:55:54 +03:00
Nikita Popov
48986653fe Remove unused READDIR_R lock 2021-03-22 10:48:59 +01:00
Max Semenik
6c9a05667b run-tests: use the EXTENSIONS section for skipping
Currently, most skip checks are just for making sure an extension is
available. Even with recent addition of skip caching, this makes tests
needlessly slow:
* Checks for the same extension in its tests can have small differences
  impacting cacheability.
* Even identical skip checks in two tests can still be executed twice if
  they're run by different workers.

To remedy this, I'm repurposing the existing --EXTENSIONS-- section of
.phpt files to specify wjich extensions are required for current test to
run. Current behavior:
1) If the extension is already visible to PHP, all is good
2) If it isn't, assume it's present as a shared module and attempt to add
   it via a command line parameter
3) If that works, all is good
4) If it doesn't, PHP fails with a cryptic error message trying to
   execute the test itself

After this commit:
1) and 2) are kept unchanged
3) Check if shared extension file from 2) is actually present
4) Skip the test if it isn't

Other benefits include clear skip reasons (vs. sometimes none in many
current skip checks) and moving test information from code to metadata,
opening more opportunities for search and analysis.

Since --EXTENSIONS-- is barely ever used, this change poses no risk of
hidden failures.

As a demonstration of the new approach, this commit migrates one
extension to it. If merged, I will migrate other extensions in
subsequent PRs.

Closes GH-6787.
2021-03-22 09:53:38 +01:00
Jakub Zelenka
a3e1082e0a Merge branch 'PHP-8.0' 2021-03-21 21:21:38 +00:00