]> granicus.if.org Git - php/log
php
4 years agoImproved JIT for RECV and RECV_INIT instructions
Dmitry Stogov [Tue, 23 Jun 2020 20:21:56 +0000 (23:21 +0300)]
Improved JIT for RECV and RECV_INIT instructions

4 years agoUse standard bool type in EXIF extension
George Peter Banyard [Tue, 23 Jun 2020 18:57:26 +0000 (20:57 +0200)]
Use standard bool type in EXIF extension

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Tue, 23 Jun 2020 17:30:12 +0000 (19:30 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Revert "Fix #79487: ::getStaticProperties() ignores property modifications"

4 years agoRevert "Fix #79487: ::getStaticProperties() ignores property modifications"
Christoph M. Becker [Tue, 23 Jun 2020 17:28:51 +0000 (19:28 +0200)]
Revert "Fix #79487: ::getStaticProperties() ignores property modifications"

This reverts commit a895bb6885fbceea3e8375816969d5510d8d082e.

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Tue, 23 Jun 2020 16:52:16 +0000 (18:52 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix #79487: ::getStaticProperties() ignores property modifications

4 years agoFix #79487: ::getStaticProperties() ignores property modifications
Christoph M. Becker [Tue, 23 Jun 2020 16:34:07 +0000 (18:34 +0200)]
Fix #79487: ::getStaticProperties() ignores property modifications

When retrieving the static class properties via reflection, we have to
cater to possible modifications.

4 years agoDeprecate the procedural API of ext/zip
Máté Kocsis [Sat, 20 Jun 2020 07:50:09 +0000 (09:50 +0200)]
Deprecate the procedural API of ext/zip

Closes GH-5746

4 years agoReplace exceptional code by side exit to VM
Dmitry Stogov [Tue, 23 Jun 2020 15:31:42 +0000 (18:31 +0300)]
Replace exceptional code by side exit to VM

4 years agoCleanup and better register usage
Dmitry Stogov [Tue, 23 Jun 2020 14:51:02 +0000 (17:51 +0300)]
Cleanup and better register usage

4 years agoReduce amount of "cold" code generated for FETCH_OBJ_* instructions
Dmitry Stogov [Tue, 23 Jun 2020 14:16:44 +0000 (17:16 +0300)]
Reduce amount of "cold" code generated for FETCH_OBJ_* instructions

4 years agoSimplify `_crypt_extended_init_r`, and fix redundant initialization on Win32/Solaris
Alex Dowad [Wed, 27 May 2020 04:01:22 +0000 (06:01 +0200)]
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.

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Tue, 23 Jun 2020 14:02:19 +0000 (16:02 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix #55857: ftp_size on large files

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 23 Jun 2020 13:58:49 +0000 (15:58 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #55857: ftp_size on large files

4 years agoFix #55857: ftp_size on large files
Christoph M. Becker [Tue, 23 Jun 2020 13:17:31 +0000 (15:17 +0200)]
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.

4 years agoFix a couple of UNKNOWN default values in ext/session
Máté Kocsis [Mon, 22 Jun 2020 20:38:01 +0000 (22:38 +0200)]
Fix a couple of UNKNOWN default values in ext/session

Closes GH-5752

4 years agoRemove unnecessary initialization in phpdbg webhelper
Nikita Popov [Tue, 23 Jun 2020 12:28:07 +0000 (14:28 +0200)]
Remove unnecessary initialization in phpdbg webhelper

This whole code is very dubious and should possibly be dropped. For
now just fix the build warning.

4 years agoEnable dba on azure
Nikita Popov [Tue, 23 Jun 2020 10:43:23 +0000 (12:43 +0200)]
Enable dba on azure

Closes GH-5756.

4 years agoFix UNKNOWN default values in ext/readline
Máté Kocsis [Tue, 23 Jun 2020 07:22:22 +0000 (09:22 +0200)]
Fix UNKNOWN default values in ext/readline

Closes GH-5755

4 years agoImprove JIT for SEPARATE_ARRAY
Dmitry Stogov [Tue, 23 Jun 2020 10:46:56 +0000 (13:46 +0300)]
Improve JIT for SEPARATE_ARRAY

4 years agoFix missing initializers in dba inifile
Nikita Popov [Tue, 23 Jun 2020 10:41:10 +0000 (12:41 +0200)]
Fix missing initializers in dba inifile

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Tue, 23 Jun 2020 10:36:04 +0000 (12:36 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Restore XFAIL on fpm test

4 years agoAvoid convert_to_long_ex usage in readline
Nikita Popov [Tue, 23 Jun 2020 10:35:51 +0000 (12:35 +0200)]
Avoid convert_to_long_ex usage in readline

4 years agoRestore XFAIL on fpm test
Nikita Popov [Tue, 23 Jun 2020 10:35:11 +0000 (12:35 +0200)]
Restore XFAIL on fpm test

Still fails intermittently.

4 years agoUpdate azure pipelins to ubuntu 20.04
Nikita Popov [Fri, 19 Jun 2020 13:42:17 +0000 (15:42 +0200)]
Update azure pipelins to ubuntu 20.04

Only updating the main job for now, to see how it goes.

Closes GH-5741.

4 years agoImprove spill code
Dmitry Stogov [Tue, 23 Jun 2020 09:27:14 +0000 (12:27 +0300)]
Improve spill code

4 years agoAvoid register spilling
Dmitry Stogov [Tue, 23 Jun 2020 08:40:36 +0000 (11:40 +0300)]
Avoid register spilling

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Tue, 23 Jun 2020 08:34:44 +0000 (10:34 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  7.3 is now 7.3.21-dev

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 23 Jun 2020 08:32:25 +0000 (10:32 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  7.3 is now 7.3.21-dev

4 years ago7.3 is now 7.3.21-dev
Christoph M. Becker [Tue, 23 Jun 2020 08:29:42 +0000 (10:29 +0200)]
7.3 is now 7.3.21-dev

4 years agoMerge branch 'PHP-7.4'
Derick Rethans [Tue, 23 Jun 2020 07:46:54 +0000 (08:46 +0100)]
Merge branch 'PHP-7.4'

4 years agoPHP-7.4 is now 7.4.9-dev
Derick Rethans [Tue, 23 Jun 2020 07:46:37 +0000 (08:46 +0100)]
PHP-7.4 is now 7.4.9-dev

4 years agoFix test wrt. commit 1a2732f9a8b3d62471b360f772b5458f78046f80
Christoph M. Becker [Mon, 22 Jun 2020 16:54:16 +0000 (18:54 +0200)]
Fix test wrt. commit 1a2732f9a8b3d62471b360f772b5458f78046f80

4 years agoConsistent file naming.
Derick Rethans [Mon, 22 Jun 2020 14:32:52 +0000 (15:32 +0100)]
Consistent file naming.

4 years agoUse ZPP callable check for preg_replace_callback() $callback argument
George Peter Banyard [Mon, 22 Jun 2020 13:46:23 +0000 (15:46 +0200)]
Use ZPP callable check for preg_replace_callback() $callback argument

4 years agoAlso allow casting CurlMultiHandles
Nikita Popov [Mon, 22 Jun 2020 13:09:22 +0000 (15:09 +0200)]
Also allow casting CurlMultiHandles

4 years agoFixed JIT failures on Windows
Dmitry Stogov [Mon, 22 Jun 2020 11:57:04 +0000 (14:57 +0300)]
Fixed JIT failures on Windows

4 years agoCorrect implementation of joaat hash.
Eddie Kohler [Sun, 21 Jun 2020 23:54:39 +0000 (19:54 -0400)]
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

4 years agomake bcpowmod stricter by not returning false, instead throw exception
Vladyslav Startsev [Sat, 20 Jun 2020 15:26:51 +0000 (18:26 +0300)]
make bcpowmod stricter by not returning false, instead throw exception

Closes GH-5747

4 years agoHaiku opcache jit build update
David Carlier [Sat, 20 Jun 2020 16:45:01 +0000 (16:45 +0000)]
Haiku opcache jit build update

4 years agoMerge branch 'PHP-7.4'
Anatol Belski [Sun, 21 Jun 2020 20:55:00 +0000 (22:55 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  SplHeap: Avoid memcpy on overlapping pointer

4 years agoSplHeap: Avoid memcpy on overlapping pointer
Anatol Belski [Sun, 21 Jun 2020 20:16:56 +0000 (22:16 +0200)]
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>
4 years agosapi/fpm/config.m4: add a new --with-fpm-apparmor configure flag.
Michael Orlitzky [Wed, 27 Dec 2017 01:08:37 +0000 (20:08 -0500)]
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

4 years agoMark failing tests as XFAIL for now
Christoph M. Becker [Sat, 20 Jun 2020 09:06:38 +0000 (11:06 +0200)]
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.

4 years agoAllow casting CurlHandle to int
Nikita Popov [Fri, 19 Jun 2020 14:50:59 +0000 (16:50 +0200)]
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.

4 years agoClean up some unused code (and fix some comments) in build scripts
Alex Dowad [Tue, 26 May 2020 17:56:52 +0000 (19:56 +0200)]
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.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Fri, 19 Jun 2020 15:32:34 +0000 (17:32 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed bug #79570

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 19 Jun 2020 15:32:00 +0000 (17:32 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed bug #79570

4 years agoFixed bug #79570
Böszörményi Zoltán [Fri, 19 Jun 2020 12:31:28 +0000 (14:31 +0200)]
Fixed bug #79570

Use the same logic for getgrgid_r, getpwnam_r and getpwuid_r
as for getgrnam_r in #75696

Closes GH-5740.

4 years agoFix Haiku build
David Carlier [Wed, 17 Jun 2020 21:16:29 +0000 (21:16 +0000)]
Fix Haiku build

getrusage supports only two fields. The network api sits in the network lib.

Closes GH-5732.

4 years agoReturn void from php_jpeg_emit_message()
Nikita Popov [Fri, 19 Jun 2020 14:07:14 +0000 (16:07 +0200)]
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.

4 years agoJIT for FETCH_OBJ_W
Dmitry Stogov [Fri, 19 Jun 2020 11:36:38 +0000 (14:36 +0300)]
JIT for FETCH_OBJ_W

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Fri, 19 Jun 2020 08:48:34 +0000 (10:48 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed bug #79710

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 19 Jun 2020 08:47:01 +0000 (10:47 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

4 years agoFixed bug #79710
Nikita Popov [Fri, 19 Jun 2020 08:46:02 +0000 (10:46 +0200)]
Fixed bug #79710

Make sure we don't use zresource after the stream has been destroyed.

4 years agoRemoving HTML Functionality from run-tests.php
Paul Dragoonis [Thu, 18 Jun 2020 09:40:40 +0000 (10:40 +0100)]
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.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Fri, 19 Jun 2020 07:44:56 +0000 (09:44 +0200)]
Merge branch 'PHP-7.4'

4 years agoGenerate temporary config file when generating certificates
Nikita Popov [Fri, 19 Jun 2020 07:43:56 +0000 (09:43 +0200)]
Generate temporary config file when generating certificates

The putenv trick doesn't work on ZTS Windows, so generate a new
openssl config every time.

4 years agoForbid use of <?= as a semi-reserved identifier
Nikita Popov [Fri, 19 Jun 2020 07:27:19 +0000 (09:27 +0200)]
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.

4 years agoMAY_BE_INDIRECT inference
Dmitry Stogov [Thu, 18 Jun 2020 15:54:32 +0000 (18:54 +0300)]
MAY_BE_INDIRECT inference

4 years agoFix CLI test if linked against libedit
Nikita Popov [Thu, 18 Jun 2020 15:30:03 +0000 (17:30 +0200)]
Fix CLI test if linked against libedit

The error message changed here.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 18 Jun 2020 15:14:03 +0000 (17:14 +0200)]
Merge branch 'PHP-7.4'

4 years agocheck for broken libzip versions
Remi Collet [Thu, 18 Jun 2020 14:45:39 +0000 (16:45 +0200)]
check for broken libzip versions

Closes GH-5738.

4 years agoUpdate libzip on macos
Nikita Popov [Thu, 18 Jun 2020 14:25:16 +0000 (16:25 +0200)]
Update libzip on macos

We need libzip 1.7.1, because libzip 1.7.0 is broken.

Closes GH-5737.

4 years agoCall zpp in enchant_broker_*_dict_path with libenchant-2
Nikita Popov [Thu, 18 Jun 2020 15:10:22 +0000 (17:10 +0200)]
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.

4 years agoUse ZEND_TOSTRING_FUNC_NAME
moliata [Thu, 18 Jun 2020 12:24:27 +0000 (15:24 +0300)]
Use ZEND_TOSTRING_FUNC_NAME

Closes GH-5736.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 18 Jun 2020 15:02:24 +0000 (17:02 +0200)]
Merge branch 'PHP-7.4'

4 years agoFix race condition in FPM tests
Nikita Popov [Thu, 18 Jun 2020 15:01:29 +0000 (17:01 +0200)]
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.

4 years agoAdd reference to phpweb/bin/createReleaseEntry
Sara Golemon [Thu, 18 Jun 2020 14:03:44 +0000 (14:03 +0000)]
Add reference to phpweb/bin/createReleaseEntry

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 18 Jun 2020 14:00:30 +0000 (16:00 +0200)]
Merge branch 'PHP-7.4'

4 years agoUn-XFAIL FPM tests
Nikita Popov [Thu, 18 Jun 2020 13:59:32 +0000 (15:59 +0200)]
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.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 18 Jun 2020 13:55:23 +0000 (15:55 +0200)]
Merge branch 'PHP-7.4'

4 years agoDowngrade server security level in security level test
Nikita Popov [Thu, 18 Jun 2020 13:54:02 +0000 (15:54 +0200)]
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.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 18 Jun 2020 13:49:43 +0000 (15:49 +0200)]
Merge branch 'PHP-7.4'

4 years agoAdd SubjectAltName support to certificate generator
Nikita Popov [Thu, 18 Jun 2020 13:34:33 +0000 (15:34 +0200)]
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.

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Thu, 18 Jun 2020 13:29:50 +0000 (15:29 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Add missing NEWS entry

4 years agoAdd missing NEWS entry
Christoph M. Becker [Thu, 18 Jun 2020 13:28:19 +0000 (15:28 +0200)]
Add missing NEWS entry

I forgot to update NEWS after merging back then.

4 years agoDowngrade security level in tests using TLS < 1.2
Nikita Popov [Thu, 18 Jun 2020 13:08:24 +0000 (15:08 +0200)]
Downgrade security level in tests using TLS < 1.2

A few additional tests have been added on master that require
lower security level.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 18 Jun 2020 13:02:02 +0000 (15:02 +0200)]
Merge branch 'PHP-7.4'

4 years agoGenerate certificates for bug69215.phpt
Nikita Popov [Thu, 18 Jun 2020 12:58:48 +0000 (14:58 +0200)]
Generate certificates for bug69215.phpt

4 years agoGenerate certificate for bug68920.phpt
Nikita Popov [Thu, 18 Jun 2020 12:49:15 +0000 (14:49 +0200)]
Generate certificate for bug68920.phpt

The certificate really doesn't matter here, but it still needs to
comply with security level...

4 years agoGenerate certificate for bug65729.pem
Nikita Popov [Thu, 18 Jun 2020 12:43:19 +0000 (14:43 +0200)]
Generate certificate for bug65729.pem

Make this test pass under security level 2.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 18 Jun 2020 12:22:29 +0000 (14:22 +0200)]
Merge branch 'PHP-7.4'

4 years agoRevert "Fix tests regarding OpenSSL security_level"
Nikita Popov [Thu, 18 Jun 2020 12:21:04 +0000 (14:21 +0200)]
Revert "Fix tests regarding OpenSSL security_level"

This reverts commit b281493503401a2b5c45c11fcd0498d8448998c2.

4 years agoDon't generate spurious warning is security_level not supported
Nikita Popov [Thu, 18 Jun 2020 12:20:23 +0000 (14:20 +0200)]
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.

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Thu, 18 Jun 2020 11:29:33 +0000 (13:29 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix tests regarding OpenSSL security_level

4 years agoFix tests regarding OpenSSL security_level
Christoph M. Becker [Thu, 18 Jun 2020 11:28:09 +0000 (13:28 +0200)]
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.

4 years agoFix UNKNOWN default values in ext/curl
Máté Kocsis [Thu, 18 Jun 2020 07:26:09 +0000 (09:26 +0200)]
Fix UNKNOWN default values in ext/curl

Closes GH-5734

4 years agoRemove the deprecated parameter of curl_version()
Máté Kocsis [Thu, 18 Jun 2020 07:26:58 +0000 (09:26 +0200)]
Remove the deprecated parameter of curl_version()

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 18 Jun 2020 08:49:56 +0000 (10:49 +0200)]
Merge branch 'PHP-7.4'

4 years agoMigrate some tests to certificate generator
Nikita Popov [Thu, 18 Jun 2020 08:32:33 +0000 (10:32 +0200)]
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.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 18 Jun 2020 08:16:47 +0000 (10:16 +0200)]
Merge branch 'PHP-7.4'

4 years agoDon't use ternary in ini default
Nikita Popov [Thu, 18 Jun 2020 08:15:53 +0000 (10:15 +0200)]
Don't use ternary in ini default

We use sizeof() on ini defaults, so this isn't safe. I can't reproduce
the failures locally, but I expect this to fix the asan jobs.

4 years agoUse guards for ZEND_FETCH_OBJ_R/IS to eliminate repeatable checks
Dmitry Stogov [Thu, 18 Jun 2020 08:10:47 +0000 (11:10 +0300)]
Use guards for ZEND_FETCH_OBJ_R/IS to eliminate repeatable checks

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 18 Jun 2020 08:09:58 +0000 (10:09 +0200)]
Merge branch 'PHP-7.4'

4 years agoRemove bug48187.phpt
Nikita Popov [Thu, 18 Jun 2020 08:07:45 +0000 (10:07 +0200)]
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.

4 years agoUpdate release-process.md wrt. new bin/createReleaseEntry
Christoph M. Becker [Thu, 18 Jun 2020 07:27:54 +0000 (09:27 +0200)]
Update release-process.md wrt. new bin/createReleaseEntry

4 years agoFixed multiple definition
Dmitry Stogov [Thu, 18 Jun 2020 06:34:21 +0000 (09:34 +0300)]
Fixed multiple definition

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Wed, 17 Jun 2020 20:16:11 +0000 (22:16 +0200)]
Merge branch 'PHP-7.4'

4 years agoUse sha256 as digest algorithm in certificate generator
Nikita Popov [Wed, 17 Jun 2020 20:08:54 +0000 (22:08 +0200)]
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.

4 years agoRemove unneeded --disable-inline-optimization build parameter
Alex Dowad [Wed, 27 May 2020 06:12:45 +0000 (08:12 +0200)]
Remove unneeded --disable-inline-optimization build parameter

In 1999, inline optimization was turned off by default. The commit log indicates this was
done because GCC was running out of memory on some hosts when building the Zend executor.
In 2003, inline optimization was re-enabled by default, but a build option was added to
turn it off if one runs out of memory when building.

Computing hardware has come a long way since 2003 and I doubt that anyone is running out
of memory when building PHP now.

Interestingly, this code set an unused variable called `INLINE_CFLAGS`. It actually
disabled inline optimization by adding -O0 to the build command, not using `INLINE_CFLAGS`.

Just to see how much memory GCC/Make are using when building PHP, I tried building with
successively higher values of `ulimit -v` until it succeeded. Interestingly, while most
of the codebase can be built with about 400MB of memory, ext/fileinfo/libmagic/apprentice.c
requires 1.2GB, doubtless because it includes ext/fileinfo/data_file.c, which is more
than 350,000 lines long. That is with GCC 7.5.0.

Most users get PHP as a binary package anyways, so the question is, are *packagers*
of PHP trying to build on machines with just 1GB RAM? And would they want to package
a PHP interpreter built with *no optimizations*? I can't imagine either being true.