1
0
mirror of https://github.com/php/php-src.git synced 2026-04-20 06:21:12 +02:00
Commit Graph

58518 Commits

Author SHA1 Message Date
Nikita Popov
7a306c0813 Fix skipif section in test
This was migrated to --EXTENSIONS--.
2021-04-06 09:58:49 +02:00
twosee
fc64a7bef4 Ignore some opcodes in JIT check
Some user opcode handler actually gets called when JIT is used, so do not disable JIT even if these user opcode handlers were registered, just ignore them.

ZEND_EXIT can help Swoole to detect exit/die operation and exit from the current coroutine and record exit_status correctly.
ZEND_*_SILENCE can help Swoole to switch EG(error_reporting) to keep the right behavior when using the error control operator.
So we ignore ZEND_EXIT, ZEND_BEGIN_SILENCE, ZEND_END_SILENCE in JIT check here.

Closes GH-6640.
2021-04-06 11:58:20 +08:00
Anatol Belski
4af6679d78 fileinfo: Update libmagic.patch
Signed-off-by: Anatol Belski <ab@php.net>
2021-04-05 22:41:00 +02:00
Anatol Belski
f60dc3bd34 fileinfo: More VS compat
Signed-off-by: Anatol Belski <ab@php.net>
2021-04-05 21:23:26 +02:00
Anatol Belski
cd238bd09d fileinfo: Fix VS compat
Signed-off-by: Anatol Belski <ab@php.net>
2021-04-05 21:10:20 +02:00
Anatol Belski
f7ab54cbe7 fileinfo: Restore config.h for libmagic
Signed-off-by: Anatol Belski <ab@php.net>
2021-04-05 20:56:41 +02:00
Anatol Belski
3b9173dc8f fileinfo: Port libmagic 5.40
Signed-off-by: Anatol Belski <ab@php.net>
2021-04-05 20:19:07 +02:00
Dmitry Stogov
22019a1edd Fixed unintended string duplication 2021-04-05 17:55:42 +03:00
George Peter Banyard
705e93a22f Fix necessary extensions list for OPcache test 2021-04-05 06:34:13 +01:00
Max Semenik
e9f783fcdd Migrate skip checks to --EXTENSIONS--, p3
For rationale, see #6787

Extensions migrated in part 3:
* ftp
* gmp
* iconv
* opcache
* shmop
2021-04-03 15:23:25 +02:00
Dmitry Stogov
33f938bad0 Fixed macros 2021-04-02 19:22:30 +03:00
Dmitry Stogov
46865392fe Attempt to fix ext/spl/tests/bug67359.phpt broken by f323baa845 2021-04-02 19:09:29 +03:00
Dmitry Stogov
93430e2b14 clear only neccessary part of spl_filesystem_object 2021-04-02 17:51:18 +03:00
Dmitry Stogov
f323baa845 Reduce number of stat() calls 2021-04-02 13:39:12 +03:00
Max Semenik
bd9f4fa676 Migrate skip checks to --EXTENSIONS--, p2
For rationale, see https://github.com/php/php-src/pull/6787

Make extension checks lowercase, add a special case for opcache
that has internal name not matching .so filename.

Extensions migrated in part 2:
* dom
* exif
* fileinfo
* ffi
2021-04-01 12:08:24 +01:00
Mike Pall
83b01a920e DynASM: Fix global label references
ARM64 patch contributed by Hao Sun and Nick Gasson.
2021-03-31 23:55:36 +03:00
Mike Pall
0b4f83f68f DynASM/ARM64: Add VREG support.
Contributed by Hao Sun and Nick Gasson.
2021-03-31 23:54:22 +03:00
Dmitry Stogov
b428c51aea Merge upstream DynAsm changes from LuaJIT 2021-03-31 23:51:19 +03:00
Dmitry Stogov
a6dd92f820 Remove reference to $GLOBALS. We don't create an actual variable for $GLOBALS any more . 2021-03-31 12:28:23 +03:00
Dmitry Stogov
84a843dff6 Use better function 2021-03-30 20:20:54 +03:00
Dmitry Stogov
8c001d5ba3 We don't create an actual variable for $GLOBALS any more. 2021-03-30 15:12:10 +03:00
Christoph M. Becker
90da9bf53b Merge branch 'PHP-8.0'
* PHP-8.0:
  Handle reference zvals when outputting superglobals in phpinfo()

Signed-off-by: Christoph M. Becker <cmbecker69@gmx.de>
2021-03-30 13:55:36 +02:00
Christoph M. Becker
443478109b Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Handle reference zvals when outputting superglobals in phpinfo()

Signed-off-by: Christoph M. Becker <cmbecker69@gmx.de>
2021-03-30 13:52:38 +02:00
Rowan Tommins
206fd35a98 Handle reference zvals when outputting superglobals in phpinfo()
Fixes <https://bugs.php.net/80915>.

Closes GH-80915.

Signed-off-by: Christoph M. Becker <cmbecker69@gmx.de>
2021-03-30 13:49:22 +02:00
Dmitry Stogov
849ae12e7a Simplify auto-globals checks 2021-03-30 13:56:29 +03:00
Nikita Popov
202a701a4e Merge branch 'PHP-8.0'
* PHP-8.0:
  Remove zero size special case for copy_to_stream
2021-03-29 15:22:50 +02:00
Nikita Popov
b95b553489 Remove zero size special case for copy_to_stream
This doesn't seem to serve a purpose anymore. Stats are expensive,
so doing an unnecessary stat just to short-circuit the zero size
case is rather dubious. It can also break with stream wrappers
that return inaccurate sizes (symfony/symfony#40574) and probably
can also break with stream filters.

Drop the special case and adjust code to make it more obvious that
it will still be handled correctly.

Closes GH-6807.
2021-03-29 15:21:59 +02:00
George Peter Banyard
8560d168d3 Align types with the output of zend_hash_num_elements() 2021-03-29 14:20:22 +01:00
Cameron Hall
5b29eba7ca Fix #42357: fputcsv() has an optional parameter for line endings
fputcsv does not terminate lines correctly as per RFC 41801[1]. After adding a new parameter fputcsv may now use a user defined line ending,. In order to maintain backwards compatibility fputcsv() still terminates lines with "\n" by default.

Also fixes: #46367[2], #62770[3]
Ref: #42357[4]

[1] <https://tools.ietf.org/html/rfc4180>
[2] <https://bugs.php.net/bug.php?id=46367>
[3] <https://bugs.php.net/bug.php?id=62770>
[4] <https://bugs.php.net/bug.php?id=42357>
2021-03-29 13:34:38 +01:00
Christoph M. Becker
8f1ec5be60 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #69668: SOAP special XML characters in namespace URIs not encoded

Signed-off-by: Christoph M. Becker <cmbecker69@gmx.de>
2021-03-29 14:20:13 +02:00
Christoph M. Becker
dd227f61df Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #69668: SOAP special XML characters in namespace URIs not encoded

Signed-off-by: Christoph M. Becker <cmbecker69@gmx.de>
2021-03-29 14:19:39 +02:00
Christoph M. Becker
75cb678206 Fix #69668: SOAP special XML characters in namespace URIs not encoded
`xmlNewNs()` does not XML encode the passed `href`, so we need to do
that manually.

Closes GH-6804.

Signed-off-by: Christoph M. Becker <cmbecker69@gmx.de>
2021-03-29 14:17:55 +02: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
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
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
Dmitry Stogov
3e996622c7 Replace function with macro 2021-03-24 10:36:47 +03: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