1
0
mirror of https://github.com/php/php-src.git synced 2026-04-23 07:58:20 +02:00
Commit Graph

55424 Commits

Author SHA1 Message Date
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
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
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
Dmitry Stogov 6fa126e966 MAY_BE_INDIRECT inference 2020-06-18 18:54:32 +03: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 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
Nikita Popov b5f5da4211 Merge branch 'PHP-7.4' 2020-06-18 15:56:14 +02:00
Nikita Popov 8ba0624a09 Downgrade server security level in security level test
We want to test the client side error here, so make sure the
server side can start up successfully.
2020-06-18 15:54:02 +02:00
Nikita Popov 472352f5a7 Merge branch 'PHP-7.4' 2020-06-18 15:49:43 +02:00
Nikita Popov c7fe71c8b7 Add SubjectAltName support to certificate generator
And switch tests using SAN certificates to the generator.

This is ugly, but there doesn't seem to be a more direct way
to privide SAN in PHP.
2020-06-18 15:49:08 +02:00
Nikita Popov c2a6395dcb Downgrade security level in tests using TLS < 1.2
A few additional tests have been added on master that require
lower security level.
2020-06-18 15:08:24 +02:00
Nikita Popov f3ff070034 Merge branch 'PHP-7.4' 2020-06-18 15:02:02 +02:00
Nikita Popov 72b3987c2d Generate certificates for bug69215.phpt 2020-06-18 14:58:48 +02:00
Nikita Popov 58ca47aff6 Generate certificate for bug68920.phpt
The certificate really doesn't matter here, but it still needs to
comply with security level...
2020-06-18 14:49:15 +02:00
Nikita Popov dd7d161ccf Generate certificate for bug65729.pem
Make this test pass under security level 2.
2020-06-18 14:43:57 +02:00
Nikita Popov 4f0ae4ad6e Merge branch 'PHP-7.4' 2020-06-18 14:22:29 +02:00
Nikita Popov 2c0d47c4b4 Revert "Fix tests regarding OpenSSL security_level"
This reverts commit b281493503.
2020-06-18 14:22:20 +02:00
Nikita Popov 51e3cb3916 Don't generate spurious warning is security_level not supported
People should not have to worry about the used openssl version
when downgrading security_level.
2020-06-18 14:21:53 +02:00
Christoph M. Becker 5989b09d18 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix tests regarding OpenSSL security_level
2020-06-18 13:29:33 +02:00
Christoph M. Becker b281493503 Fix tests regarding OpenSSL security_level
The `security_level` stream option is only available as of OpenSSL
1.1.0, so we only set it for these versions.  Older OpenSSL versions
do not have security levels at all.
2020-06-18 13:28:09 +02:00
Máté Kocsis ed6fbf9174 Fix UNKNOWN default values in ext/curl
Closes GH-5734
2020-06-18 13:26:32 +02:00
Máté Kocsis a43fd3bbef Remove the deprecated parameter of curl_version() 2020-06-18 13:26:32 +02:00
Nikita Popov 20664d6023 Merge branch 'PHP-7.4' 2020-06-18 10:49:56 +02:00
Nikita Popov 6b702eea15 Migrate some tests to certificate generator
This migrates all the tests using ext/openssl/tests/streams_crypto_method.pem
to the certificate generator, so we can easily adjust needed parameters.
In particular, this makes the cert security level 2 compatible.

However, we still need to downgrade security_level to 1 in a number
of tests, because they are testing TLS < 1.2 connections.
2020-06-18 10:49:36 +02:00
Dmitry Stogov 8cbb0ffcb1 Use guards for ZEND_FETCH_OBJ_R/IS to eliminate repeatable checks 2020-06-18 11:10:47 +03:00
Nikita Popov e42cab2088 Merge branch 'PHP-7.4' 2020-06-18 10:09:58 +02:00
Nikita Popov 4c899fba41 Remove bug48187.phpt
Saw a spurious failure from this one on azure macos, presumably
the process got interrupted in the middle and waited for more than
one second to resume.

After looking a bit more closely, this test doesn't actually test
what bug #48187 reported, because there is no DateTime::diff()
anywhere to be found. This test was also added speculatively,
because the root cause was never diagnosed, and the problems seems
to have resolved itself at some point.

As such, I'm simply dropping this test, rather than figuring out
how to make it more robust.
2020-06-18 10:07:45 +02:00
Dmitry Stogov 4050db614a Fixed multiple definition 2020-06-18 09:34:21 +03:00
Nikita Popov 9b70a831a2 Merge branch 'PHP-7.4' 2020-06-17 22:16:11 +02:00
Nikita Popov 52c2f1126d Use sha256 as digest algorithm in certificate generator
This makes the generated certificates compatible with security
level 2, which is apparently the default on Ubuntu 20.04.

Unfortunately this does not fix all tests, because some are using
pre-generated certificates.
2020-06-17 22:15:00 +02:00
Nikita Popov 4f260411d1 Merge branch 'PHP-7.4' 2020-06-17 17:14:05 +02:00
Nikita Popov 9b3e57921f Suppress zend signals check in two readline tests
Installing a callback handler may cause libedit to register new
signals during the request.
2020-06-17 17:13:01 +02:00
Máté Kocsis 314eedbc35 Convert resources to objects in ext/zlib
Closes GH-5680
2020-06-17 16:50:00 +02:00
Máté Kocsis 1efaed7cf7 Improve error messages of ext/zlib 2020-06-17 16:50:00 +02:00