1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 23:48:14 +02:00
Commit Graph

119222 Commits

Author SHA1 Message Date
Nikita Popov d071ab1928 Fix verify arg jit for references 2020-06-24 10:47:37 +02:00
Christoph M. Becker 26badd58b5 Mark phpdbg test as XFAIL on Windows with JIT enabled
The test fails as of commit 8b12ea04ee.
2020-06-24 10:34:16 +02:00
Nikita Popov c008fde961 Skip two curl tests under asan
These tests leak with the curl version on ubuntu 20.04. This should
be fixed when we switch exit to use an exception.
2020-06-24 10:13:25 +02:00
Christoph M. Becker 1dfeb70e6b Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79487: ::getStaticProperties() ignores property modifications
2020-06-24 10:08:51 +02:00
Christoph M. Becker ef2130db88 Fix #79487: ::getStaticProperties() ignores property modifications
When retrieving the static class properties via reflection, we have to
cater to possible modifications.
2020-06-24 10:05:51 +02:00
Nikita Popov c9b9f525a9 Include stub hash in generated arginfo files
The hash is used to check whether the arginfo file needs to be
regenerated. PHP-Parser will only be downloaded if this is actually
necessary.

This ensures that release artifacts will never try to regenerate
stubs and thus fetch PHP-Parser, as long as you do not modify any
files.

Closes GH-5739.
2020-06-24 09:55:19 +02:00
Alex Dowad d1ebc3ab21 Increase failure threshold for 'extensive backtracking' fileinfo test
A spurious failure for this test was seen on Travis CI (S390X):

https://travis-ci.org/github/alexdowad/php-src/jobs/701533828

(The test is expected to finish within 1 second, but it took 1.06 seconds.)
Therefore, increase the threshold a bit.
2020-06-24 08:46:19 +02:00
Máté Kocsis ba434fb5a6 Remove outdated PHPDoc from ext/enchant's stub 2020-06-23 22:35:27 +02:00
Dmitry Stogov 8b12ea04ee Improved JIT for RECV and RECV_INIT instructions 2020-06-23 23:21:56 +03:00
George Peter Banyard 6079bdb287 Use standard bool type in EXIF extension 2020-06-23 20:57:26 +02:00
Christoph M. Becker cf70026ebc Merge branch 'PHP-7.4'
* PHP-7.4:
  Revert "Fix #79487: ::getStaticProperties() ignores property modifications"
2020-06-23 19:30:12 +02:00
Christoph M. Becker f3cccfde9e Revert "Fix #79487: ::getStaticProperties() ignores property modifications"
This reverts commit a895bb6885.
2020-06-23 19:28:51 +02:00
Christoph M. Becker f1d0eadc4d Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79487: ::getStaticProperties() ignores property modifications
2020-06-23 18:52:16 +02:00
Christoph M. Becker a895bb6885 Fix #79487: ::getStaticProperties() ignores property modifications
When retrieving the static class properties via reflection, we have to
cater to possible modifications.
2020-06-23 18:48:54 +02:00
Máté Kocsis f3b1f342c8 Deprecate the procedural API of ext/zip
Closes GH-5746
2020-06-23 17:39:29 +02:00
Dmitry Stogov da1c672424 Replace exceptional code by side exit to VM 2020-06-23 18:31:42 +03:00
Dmitry Stogov e2a8b3e120 Cleanup and better register usage 2020-06-23 17:51:02 +03:00
Dmitry Stogov 6ac16882d4 Reduce amount of "cold" code generated for FETCH_OBJ_* instructions 2020-06-23 17:16:44 +03:00
Alex Dowad 7a9f0cc3d0 Simplify _crypt_extended_init_r, and fix redundant initialization on Win32/Solaris
Looking at the history of this function, the original implementation had a bug where
it would return from the middle of the function without unlocking the mutex first.
The author attempted to fix this by incrementing the `initialized` flag atomically,
which is not necessary, since the section which modifies the flag is protected by a
mutex.

Coincidentally, at the same time that all this unnecessary 'atomic' machinery was
introduced, the code was also changed so that it didn't return without unlocking the
mutex. So it looks like the bug was fixed by accident.

It's not necessary to declare the flag as `volatile` either, since it is protected
by a mutex.

Further, the 'fixed' implementation was also wrong in another respect: on Windows
and Solaris, the `initialized` flag was not even declared as `static`!! So the
initialization of the static tables for S-boxes, P-boxes, etc. was repeated on
each call to `php_crypt`, completely defeating the purpose of this function.
2020-06-23 16:10:54 +02:00
Christoph M. Becker 9bd648ba1e Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #55857: ftp_size on large files
2020-06-23 16:02:19 +02:00
Christoph M. Becker e7bbac9d11 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #55857: ftp_size on large files
2020-06-23 16:00:11 +02:00
Christoph M. Becker e94126aac7 Fix #55857: ftp_size on large files
`atol()` returns a `long` which is not the same as `zend_long` on
LLP64; we use `ZEND_ATOL()` instead.

There is no need for a new test case, since filesize_large.phpt already
tests for that behavior; unfortunately, the FTP test suite relies on
`pcntl_fork()` and therefore cannot be run on Windows.
2020-06-23 15:57:24 +02:00
Máté Kocsis b981662855 Fix a couple of UNKNOWN default values in ext/session
Closes GH-5752
2020-06-23 15:42:59 +02:00
Nikita Popov 35729b7604 Remove unnecessary initialization in phpdbg webhelper
This whole code is very dubious and should possibly be dropped. For
now just fix the build warning.
2020-06-23 14:29:24 +02:00
Nikita Popov 361aa1ea48 Enable dba on azure
Closes GH-5756.
2020-06-23 14:29:24 +02:00
Máté Kocsis 8d93ae1a23 Fix UNKNOWN default values in ext/readline
Closes GH-5755
2020-06-23 12:52:12 +02:00
Dmitry Stogov bdac60d2c0 Improve JIT for SEPARATE_ARRAY 2020-06-23 13:46:56 +03:00
Nikita Popov 5794fbf5f8 Fix missing initializers in dba inifile 2020-06-23 12:41:10 +02:00
Nikita Popov 40d162e423 Merge branch 'PHP-7.4'
* PHP-7.4:
  Restore XFAIL on fpm test
2020-06-23 12:36:04 +02:00
Nikita Popov f7a3cb4c39 Avoid convert_to_long_ex usage in readline 2020-06-23 12:35:51 +02:00
Nikita Popov c4639a2deb Restore XFAIL on fpm test
Still fails intermittently.
2020-06-23 12:35:11 +02:00
Nikita Popov 334b9059fa Update azure pipelins to ubuntu 20.04
Only updating the main job for now, to see how it goes.

Closes GH-5741.
2020-06-23 12:16:52 +02:00
Dmitry Stogov c973f19744 Improve spill code 2020-06-23 12:27:14 +03:00
Dmitry Stogov 5681eaf5e5 Avoid register spilling 2020-06-23 11:40:36 +03:00
Christoph M. Becker f7dacdbf58 Merge branch 'PHP-7.4'
* PHP-7.4:
  7.3 is now 7.3.21-dev
2020-06-23 10:34:44 +02:00
Christoph M. Becker 36d3c4d353 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  7.3 is now 7.3.21-dev
2020-06-23 10:32:25 +02:00
Christoph M. Becker 91982bad63 7.3 is now 7.3.21-dev 2020-06-23 10:29:42 +02:00
Derick Rethans 24007a1109 Merge branch 'PHP-7.4' 2020-06-23 08:46:54 +01:00
Derick Rethans 13f9f874a7 PHP-7.4 is now 7.4.9-dev 2020-06-23 08:46:37 +01:00
Christoph M. Becker dad377ba57 Fix test wrt. commit 1a2732f9a8 2020-06-22 18:55:16 +02:00
Derick Rethans 56ab608463 Consistent file naming. 2020-06-22 15:32:52 +01:00
George Peter Banyard 1a2732f9a8 Use ZPP callable check for preg_replace_callback() $callback argument 2020-06-22 15:56:36 +02:00
Nikita Popov 26171c3690 Also allow casting CurlMultiHandles 2020-06-22 15:09:22 +02:00
Dmitry Stogov ea2b0d3c8b Fixed JIT failures on Windows 2020-06-22 14:57:04 +03:00
Eddie Kohler efad1372a5 Correct implementation of joaat hash.
Before this commit, the result produced by a joaat hash depended
on how the input data was chunked. A hash produced by multiple
`hash_update` operations was incorrect. For example, this code,
which should produce three identical lines:

    var_dump(hash("joaat", "abcd"));

    $hash = hash_init("joaat");
    hash_update($hash, "ab");
    hash_update($hash, "cd");
    var_dump(hash_final($hash));

    $hash = hash_init("joaat");
    hash_update($hash, "abc");
    hash_update($hash, "d");
    var_dump(hash_final($hash));

instead produced:

    string(8) "cd8b6206"
    string(8) "e590d137"
    string(8) "2d59d087"

This is because the finalization step, involving shift operations
and adds, was applied on every chunk, rather than once at the end
as is required by the hash definition.

After this commit, the code above produces:

    string(8) "cd8b6206"
    string(8) "cd8b6206"
    string(8) "cd8b6206"

as expected.

Some tests encoded the wrong behavior and were corrected.

Closes GH-5749
2020-06-22 09:39:29 +02:00
Vladyslav Startsev 2c97b401c6 make bcpowmod stricter by not returning false, instead throw exception
Closes GH-5747
2020-06-22 09:31:55 +02:00
David Carlier ec80b781db Haiku opcache jit build update 2020-06-22 09:28:58 +03:00
Anatol Belski 56aebbec8b Merge branch 'PHP-7.4'
* PHP-7.4:
  SplHeap: Avoid memcpy on overlapping pointer
2020-06-21 22:55:00 +02:00
Anatol Belski afe14236e3 SplHeap: Avoid memcpy on overlapping pointer
Check if data would overlap and also add an assert. Previous
implementations didn't have this issue, as the direct assignment was
used.

Signed-off-by: Anatol Belski <ab@php.net>
2020-06-21 22:53:46 +02:00
Michael Orlitzky 40cdc5f298 sapi/fpm/config.m4: add a new --with-fpm-apparmor configure flag.
The existing AC_FPM_APPARMOR macro (which is always run when FPM is
enabled) checks for the existence of libapparmor, and adds it to $LIBS
if found. The result is an "automagic" dependency on libapparmor that
depends not only on the user's configuration, but also on the build
host's environment.

In particular, this can cause problems if the user just happens to
have libapparmor installed (for testing or development) when he builds
PHP. Later, he may remove libapparmor, not realizing that PHP depends
on it. At that point, FPM will cease to work due to the missing library.

This commit adds a new configure flag called "--with-fpm-apparmor",
defaulting to "no", that enables or disables the feature. The new flag
is used to signal the user's intent; whether or not he wants to use
AppArmor. If he does, then we still check for the existence and
usability of libapparmor; however, it is now an error for the library
to be missing when --with-fpm-apparmor is requested.

Gentoo-bug: https://bugs.gentoo.org/637402
PHP-bug: https://bugs.php.net/bug.php?id=75519
2020-06-21 17:08:40 +01:00