1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 10:16:41 +02:00
Commit Graph

119194 Commits

Author SHA1 Message Date
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
Christoph M. Becker 6bc375f40a Mark failing tests as XFAIL for now
These test fail on Window since some recent changes to JIT; we mark
them as XFAIL until the issues are resolved.
2020-06-20 11:07:57 +02:00
Nikita Popov 1c4463c77a Allow casting CurlHandle to int
(int) $curlHandle will return spl_object_id($curlHandle). This
makes curl handle objects backwards compatible with code using
(int) $curlHandle to obtain a resource ID.

Closes GH-5743.
2020-06-19 23:05:47 +02:00
Alex Dowad 7e2147be23 Clean up some unused code (and fix some comments) in build scripts
- Fix typo in build/php.m4

- Nothing uses HAVE_INTTYPES_H; so remove check for header file

- Nothing defines ZEND_ACCONFIG_H_NO_C_PROTOS; so remove #ifndef

- `format_money` was removed in 2019, so <monetary.h> no longer needed

- Nothing uses HAVE_NETDB_H; so remove check for header file

- Nothing checks HAVE_TERMIOS_H; so remove check for header file

    (This was actually added when Wez Furlong was adding the original implementation of
    PTY support in `proc_open`, since replaced.)

- Nothing checks HAVE_SYS_AUXV_H; so remove check for header file

- PHP_BUILD_DATE variable is not used for anything, so remove it

    This variable was added to the Makefile, but from there, was not used for anything.
    The comments suggest it was intended to allow 'reproducible builds'. Presumably,
    this means that if a bug is found in a PHP binary somewhere, one could look at the
    Makefile which it was built from, see the date, and then could check the same
    code version out from source control. But... there can easily be multiple commits
    to the repo in the same day. Also, what makes us think that the Makefile which a
    binary was built from will be easily available?

    Besides, ext/standard/info.c already embeds the build date and time in each binary...
    but it does it using `__DATE__` and `__TIME__` (see `php_print_info`).

- Nothing checks HAVE_FINITE; so don't check for function

- Grammar fix to comment in build/php.m4

- Nothing sets $php_ldflags_add_usr_lib variable in configure, so remove conditional

    This was added in 2002, when Rasmus was having difficulty building PHP on some
    host and needed to have /usr/lib in the rpath. It was never documented and
    probably has never been used by anyone else.
2020-06-19 22:04:52 +02:00
Nikita Popov aa2e68cf6e Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #79570
2020-06-19 17:32:34 +02:00
Nikita Popov 525d8a8bfa Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #79570
2020-06-19 17:32:21 +02:00
Böszörményi Zoltán 6aff9a50ca Fixed bug #79570
Use the same logic for getgrgid_r, getpwnam_r and getpwuid_r
as for getgrnam_r in #75696

Closes GH-5740.
2020-06-19 17:31:28 +02:00
David Carlier bb61346580 Fix Haiku build
getrusage supports only two fields. The network api sits in the network lib.

Closes GH-5732.
2020-06-19 17:21:55 +02:00
Nikita Popov ca48129cae Return void from php_jpeg_emit_message()
Instead of returning long and then casting to void.

This fixes a build warning on Ubuntu 20.04.

Closes GH-5742.
2020-06-19 16:59:29 +02:00
Dmitry Stogov b4b5734d80 JIT for FETCH_OBJ_W 2020-06-19 14:36:38 +03:00
Nikita Popov b461e6b074 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #79710
2020-06-19 10:48:34 +02:00
Nikita Popov 2f56b0018e Merge branch 'PHP-7.3' into PHP-7.4 2020-06-19 10:47:01 +02:00
Nikita Popov 32f377b0b9 Fixed bug #79710
Make sure we don't use zresource after the stream has been destroyed.
2020-06-19 10:46:26 +02:00
Paul Dragoonis 5d7ff25311 Removing HTML Functionality from run-tests.php
As discussed on GH-5632, the HTML functionality does not appear
to be in active use. For HTML rendering of test results, it is
suggested to instead use the JUnit integration, in combination
with your favorite JUnit viewer.

Closes GH-5705.
2020-06-19 09:59:38 +02:00
Nikita Popov cd7d96610c Merge branch 'PHP-7.4' 2020-06-19 09:44:56 +02:00
Nikita Popov 21a2da2349 Generate temporary config file when generating certificates
The putenv trick doesn't work on ZTS Windows, so generate a new
openssl config every time.
2020-06-19 09:43:56 +02:00
Nikita Popov 5571765609 Forbid use of <?= as a semi-reserved identifier
One of the weirdest pieces of PHP code I've ever seen. In terms
of tokens, this gets internally translated to

    use x as y; echo as my_echo;

On master it crashes because this "echo" does not have attached
identifier metadata. Make sure it is added and then reject the
use of "<?=" as an identifier inside zend_lex_tstring.

Fixes oss-fuzz #23547.
2020-06-19 09:29:58 +02:00
Dmitry Stogov 6fa126e966 MAY_BE_INDIRECT inference 2020-06-18 18:54:32 +03:00
Nikita Popov 3a9a8df3fd Fix CLI test if linked against libedit
The error message changed here.
2020-06-18 17:30:03 +02:00
Nikita Popov 6b1e449ef4 Merge branch 'PHP-7.4' 2020-06-18 17:14:03 +02:00
Remi Collet f3e6b123dc check for broken libzip versions
Closes GH-5738.
2020-06-18 17:13:01 +02:00
Nikita Popov 090bddb934 Update libzip on macos
We need libzip 1.7.1, because libzip 1.7.0 is broken.

Closes GH-5737.
2020-06-18 17:12:23 +02:00
Nikita Popov 607567b9cd Call zpp in enchant_broker_*_dict_path with libenchant-2
Even if the function is a dummy, we still need to call zpp to
comply with arginfo.
2020-06-18 17:10:22 +02:00
moliata 48e16a9dba Use ZEND_TOSTRING_FUNC_NAME
Closes GH-5736.
2020-06-18 17:06:19 +02:00
Nikita Popov ebc3043816 Merge branch 'PHP-7.4' 2020-06-18 17:02:24 +02:00
Nikita Popov ea3a317659 Fix race condition in FPM tests
The newly de-XFAILed tests have a race condition. Make sure we
terminate only after expecting all the log lines.
2020-06-18 17:01:29 +02:00
Sara Golemon 0ab8121c23 Add reference to phpweb/bin/createReleaseEntry 2020-06-18 14:04:01 +00:00
Nikita Popov 111f05610d Merge branch 'PHP-7.4' 2020-06-18 16:00:30 +02:00
Nikita Popov 76ca6bf3ef Un-XFAIL FPM tests
These were XFAILed due to a bug in the log implementation that
caused intermittent failures. However, this issue is supposed to
be resolved in the meantime, so try dropping the XFAIL marker.
2020-06-18 15:59:32 +02:00