]> granicus.if.org Git - php/log
php
5 years agoConvert short tag to standard tag in Zend test file
George Peter Banyard [Thu, 11 Jul 2019 14:06:41 +0000 (16:06 +0200)]
Convert short tag to standard tag in Zend test file

Closes GH-4389.

5 years agoSwitch to using shell-less proc_open() in various server tests
Nikita Popov [Mon, 1 Jul 2019 11:07:30 +0000 (13:07 +0200)]
Switch to using shell-less proc_open() in various server tests

5 years agoSupport redirect+null descriptors in proc_open
Nikita Popov [Fri, 5 Jul 2019 15:41:59 +0000 (17:41 +0200)]
Support redirect+null descriptors in proc_open

This adds support for doing something like:

    [1 => ['pipe', 'w'], 2 => ['redirect', 1]]

This will make descriptor 2 on the child end a dup'd descriptor 1.
This is mainly useful in conjunction with shell-less mode, because
we don't have an easy way to do "2>&1" there.

Additionally we support:

    [1 => ['pipe', 'w'], 2 => ['null']]

Which would be the same as a >/dev/null or >nul redirect, depending
on platform.

5 years agoDon't call Reflection::export() internally
Nikita Popov [Thu, 11 Jul 2019 12:13:05 +0000 (14:13 +0200)]
Don't call Reflection::export() internally

export() methods were implemented in a roundabout way, where they
would call Reflection::export(), which would then call __toString().
Cut out the middleman by directly calling __toString().

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Thu, 11 Jul 2019 11:10:41 +0000 (13:10 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #78212: Segfault in built-in webserver

5 years agoFix #78212: Segfault in built-in webserver
Christoph M. Becker [Thu, 27 Jun 2019 09:34:51 +0000 (11:34 +0200)]
Fix #78212: Segfault in built-in webserver

Since syslog's ident and facility parameters have been added to
config[1], vsyslog() segfaults on Windows, if openlog() has not been
called before.  We bring back the removed lines to fix this.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=2475337bd8a0fad0dac03db3f5e7e9d331d53653>

5 years agoInclude test name in JUnit testcase name
Nikita Popov [Thu, 11 Jul 2019 10:45:49 +0000 (12:45 +0200)]
Include test name in JUnit testcase name

Azure does not show the classname attribute in any convenient way,
and the file name is the part we usually care about.

5 years agoMake proc_open_bug64438.phpt more robust
Nikita Popov [Thu, 11 Jul 2019 10:32:57 +0000 (12:32 +0200)]
Make proc_open_bug64438.phpt more robust

The test currently assumes that we'll first read the data of
stdout and stderr and then see eof on stdout and stderr. However
we could also read stdout, see eof on stdout, read stderr and see
eof on stderr, depending on timing.

Avoid output ordering issues by collecting events into a per-pipe
array, so interleaving is not visible.

5 years agoneon vectorization for base64
Sebastian Pop [Wed, 3 Jul 2019 20:10:38 +0000 (20:10 +0000)]
neon vectorization for base64

A similar algorithm is used to vectorize on x86_64, with a good description in
https://arxiv.org/abs/1704.00605 . On AArch64 the implementation differs in that
instead of using multiplies to shift bits around, it uses the vld3+vst4 and
vld4+vst3 combinations to load and store interleaved data.  This patch is based
on the NEON implementation of Wojciech Mula:
https://github.com/WojciechMula/base64simd/blob/master/encode/encode.neon.cpp
https://github.com/WojciechMula/base64simd/blob/master/encode/lookup.neon.cpp
and
https://github.com/WojciechMula/base64simd/blob/master/encode/encode.neon.cpp
https://github.com/WojciechMula/base64simd/blob/master/encode/encode.neon.cpp
adapted to php/ext/standard/base64.c and vectorized with factor 16 instead of 8.

On a Graviton A1 instance and on the synthetic benchmarks in
https://github.com/lemire/fastbase64 I see 175% speedup on base64 encoding and
60% speedup on base64 decode compared to the scalar implementation.

The patch passes `make test` regression testing on aarch64-linux.

5 years ago[AArch64] Use crc32 instructions when available
Sebastian Pop [Wed, 1 May 2019 16:05:11 +0000 (16:05 +0000)]
[AArch64] Use crc32 instructions when available

The time goes from 0.838s down to 0.029s (a 28x speedup) on a Graviton A1
instance and the following benchmark:

function simple_crc32() {
  $a = "foo";
  for ($i = 0; $i < 10000; $i++) {
      crc32($a);
      $a .= "o".$i;
  }
}

5 years agoAdd server conflict to soap custom content type test
Nikita Popov [Thu, 11 Jul 2019 08:26:19 +0000 (10:26 +0200)]
Add server conflict to soap custom content type test

5 years agoRefactor undefining PACKAGE_* symbols
Peter Kokot [Thu, 11 Jul 2019 00:00:51 +0000 (02:00 +0200)]
Refactor undefining PACKAGE_* symbols

Instead of patching configuration headers template generated by
the given tools - autoheader, this moves patching these symbols to
the configure step before creating and invoking the config.status
and before the configuration header file is generated from the
patched template.

Closes GH-4374

5 years agoRemove TSRM/tsrm_config.w32.h
Peter Kokot [Wed, 10 Jul 2019 19:19:44 +0000 (21:19 +0200)]
Remove TSRM/tsrm_config.w32.h

The tsrm_config.w32.h file is a simple wrapper for already defined
symbols and includes elsewhere.

Closes GH-4383

5 years agoSet expectation to reduce hot code fragmentation
Dmitry Stogov [Wed, 10 Jul 2019 15:29:35 +0000 (18:29 +0300)]
Set expectation to reduce hot code fragmentation

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Wed, 10 Jul 2019 15:28:37 +0000 (17:28 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoFix bug #78271
Nikita Popov [Wed, 10 Jul 2019 15:25:04 +0000 (17:25 +0200)]
Fix bug #78271

When cleaning nops in the dfa pass, we were always keeping the
smart branch inhibiting nop that occurs directly before the jump
instruction. However, as we skip unreachable blocks entirely, it
may happen that we need to keep a nop that occurs further back,
prior to the unreachable blocks. Account for that case now.

We should really do something about the smart branch situation,
this is very fragile...

5 years agoAlign segments on huge page boundary only for x86
Cyril Pascal [Wed, 10 Jul 2019 11:50:46 +0000 (12:50 +0100)]
Align segments on huge page boundary only for x86

Closes GH-4387.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Wed, 10 Jul 2019 11:10:07 +0000 (13:10 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoAdd CONFLICTS to recognized sections
Nikita Popov [Wed, 10 Jul 2019 11:09:06 +0000 (13:09 +0200)]
Add CONFLICTS to recognized sections

It does nothing on 7.3, but this makes it easier to write tests in
3rd party extensions.

5 years agoFix file collisions in phar tests
Nikita Popov [Wed, 10 Jul 2019 10:55:40 +0000 (12:55 +0200)]
Fix file collisions in phar tests

5 years agoAdditional fix for mysqli_fork test
Nikita Popov [Wed, 10 Jul 2019 10:42:17 +0000 (12:42 +0200)]
Additional fix for mysqli_fork test

5 years agoThrow notice on array access on illegal type
Nikita Popov [Wed, 10 Jul 2019 08:28:58 +0000 (10:28 +0200)]
Throw notice on array access on illegal type

No notice is thrown for list() accesses, because we did not come
to an agreement regarding patterns like

    while ([$key, $value] = yield $it->next()) { ... }

where silent null access may be desirable.

No effort is made to suppress multiple notices in access chains
likes $x[0][0][0], because the technical complexity this causes
does not seem worthwhile.

RFC: https://wiki.php.net/rfc/notice-for-non-valid-array-container

5 years agoFix invalid array access in mysqli_fork test
Nikita Popov [Wed, 10 Jul 2019 09:39:30 +0000 (11:39 +0200)]
Fix invalid array access in mysqli_fork test

5 years agoReduce cost for references to strings and resources
Dmitry Stogov [Wed, 10 Jul 2019 09:27:59 +0000 (12:27 +0300)]
Reduce cost for references to strings and resources

5 years agoRename support_strings to !is_list
Nikita Popov [Wed, 10 Jul 2019 08:17:40 +0000 (10:17 +0200)]
Rename support_strings to !is_list

In preparation for more behavior that depends on whether it it is
a list() access. Using support_strings for that would be
confusing.

5 years agoSimplify two unserialize() tests
Nikita Popov [Wed, 10 Jul 2019 09:04:48 +0000 (11:04 +0200)]
Simplify two unserialize() tests

unserialize() returns false for these now, so it doesn't make sense
to try and do something with the result.

5 years agoFix iteration limits in SXE test
Nikita Popov [Wed, 10 Jul 2019 08:57:02 +0000 (10:57 +0200)]
Fix iteration limits in SXE test

Test doesn't look like it's specifically testing out of bounds
access, just two different iteration patterns, so make sure the
limits are correct.

5 years agoClean up DateTimeZone::getLocation() test
Nikita Popov [Wed, 10 Jul 2019 08:52:54 +0000 (10:52 +0200)]
Clean up DateTimeZone::getLocation() test

And avoid invalid array access.

5 years agoAvoid invalid array access in fcgi.inc
Nikita Popov [Wed, 10 Jul 2019 08:44:33 +0000 (10:44 +0200)]
Avoid invalid array access in fcgi.inc

5 years agoimprove libargon2/libsodium compatibility
Remi Collet [Wed, 10 Jul 2019 07:00:41 +0000 (09:00 +0200)]
improve libargon2/libsodium compatibility

5 years agoUse e.g. instead of less common f.e. [ci skip]
Peter Kokot [Tue, 9 Jul 2019 15:53:46 +0000 (17:53 +0200)]
Use e.g. instead of less common f.e. [ci skip]

5 years agoRelax argon2 mem_cost down to 64k, bump time_cost to 4
Sara Golemon [Tue, 9 Jul 2019 15:18:13 +0000 (11:18 -0400)]
Relax argon2 mem_cost down to 64k, bump time_cost to 4

5 years agoCGI: Fix memory leak on error paths
David Carlier [Mon, 8 Jul 2019 16:07:45 +0000 (16:07 +0000)]
CGI: Fix memory leak on error paths

5 years agoAvoid unintended inlining
Dmitry Stogov [Tue, 9 Jul 2019 11:01:48 +0000 (14:01 +0300)]
Avoid unintended inlining

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Tue, 9 Jul 2019 09:05:54 +0000 (11:05 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Tue, 9 Jul 2019 09:05:18 +0000 (11:05 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

5 years agoRevert "Fixed bug #76980"
Nikita Popov [Tue, 9 Jul 2019 09:04:05 +0000 (11:04 +0200)]
Revert "Fixed bug #76980"

This reverts commit 35353dc49a73a58c17c7896c4c4c3997ef2c007d.

This changes causes issues for Symfony, see
https://github.com/symfony/symfony/issues/32395. I'm reverting it
from PHP 7.2 and PHP 7.3 and only leaving it in PHP 7.4.

5 years agoMerge remote-tracking branch 'origin/PHP-7.4' into PHP-7.4
Derick Rethans [Tue, 9 Jul 2019 08:14:01 +0000 (09:14 +0100)]
Merge remote-tracking branch 'origin/PHP-7.4' into PHP-7.4

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 9 Jul 2019 08:08:09 +0000 (10:08 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Upgrade to SQLite 3.28.0

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Christoph M. Becker [Tue, 9 Jul 2019 08:04:20 +0000 (10:04 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Upgrade to SQLite 3.28.0

5 years agoMerge branch 'PHP-7.1' into PHP-7.2
Christoph M. Becker [Tue, 9 Jul 2019 08:01:52 +0000 (10:01 +0200)]
Merge branch 'PHP-7.1' into PHP-7.2

* PHP-7.1:
  Upgrade to SQLite 3.28.0

5 years agoUpgrade to SQLite 3.28.0
Christoph M. Becker [Fri, 21 Jun 2019 13:48:50 +0000 (15:48 +0200)]
Upgrade to SQLite 3.28.0

Over the years, multiple security vulnerabilities[1] have been found
and fixed in SQLite3, so it makes sense to update our bundled libsqlite
to the latest available version.

[1] <https://www.cvedetails.com/vulnerability-list/vendor_id-9237/Sqlite.html>

5 years agoRemove duplicated code for (PRE|POST)_DEC_(OBJ|STATIC_PROP) opcodes
Dmitry Stogov [Tue, 9 Jul 2019 07:46:04 +0000 (10:46 +0300)]
Remove duplicated code for (PRE|POST)_DEC_(OBJ|STATIC_PROP) opcodes

5 years agoUpdate NEWS for 7.4.0beta1
Derick Rethans [Tue, 9 Jul 2019 07:41:09 +0000 (07:41 +0000)]
Update NEWS for 7.4.0beta1

5 years agoUpdate NEWS for PHP 7.4.0alpha3
Derick Rethans [Tue, 9 Jul 2019 07:39:49 +0000 (07:39 +0000)]
Update NEWS for PHP 7.4.0alpha3

5 years agoCatch up with current procedures
Peter Kokot [Mon, 8 Jul 2019 21:28:02 +0000 (23:28 +0200)]
Catch up with current procedures

- Git is used for moving existing extensions to PECL
- PHP versions with the PHP 7.4 examples
- Some minor tweaks here and there
- Mention re2c also
- Mention Docker image as a helper tool

5 years agoAdd zend.exception_ignore_args [ci skip]
Peter Kokot [Mon, 8 Jul 2019 17:34:47 +0000 (19:34 +0200)]
Add zend.exception_ignore_args [ci skip]

5 years agoUpdate NEWS [ci skip]
Peter Kokot [Mon, 8 Jul 2019 16:50:59 +0000 (18:50 +0200)]
Update NEWS [ci skip]

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Peter Kokot [Mon, 8 Jul 2019 16:49:15 +0000 (18:49 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Update NEWS [ci skip]
  Update NEWS [ci skip]

5 years agoUpdate NEWS [ci skip]
Peter Kokot [Mon, 8 Jul 2019 16:48:50 +0000 (18:48 +0200)]
Update NEWS [ci skip]

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Peter Kokot [Mon, 8 Jul 2019 16:48:27 +0000 (18:48 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Update NEWS [ci skip]

5 years agoUpdate NEWS [ci skip]
Peter Kokot [Mon, 8 Jul 2019 16:45:36 +0000 (18:45 +0200)]
Update NEWS [ci skip]

5 years agoFixed dispatch from inlined hybrid opcode to another opcode
Dmitry Stogov [Mon, 8 Jul 2019 15:01:46 +0000 (18:01 +0300)]
Fixed dispatch from inlined hybrid opcode to another opcode

5 years agoAdd ReflectionReference::getRefcount()
Nikita Popov [Mon, 8 Jul 2019 13:50:21 +0000 (15:50 +0200)]
Add ReflectionReference::getRefcount()

And don't return null for rc=1 references. Leave it to the user
to decide whether or not they want to consider these as references
or not.

Fixes bug #78263.

5 years agoCatch up with recent changes [ci skip]
Peter Kokot [Mon, 8 Jul 2019 14:23:27 +0000 (16:23 +0200)]
Catch up with recent changes [ci skip]

- RFC about password_hash portability improvements added
- build system minor updates noted
- typos

5 years agoRemove APACHE symbol
Peter Kokot [Mon, 8 Jul 2019 13:05:54 +0000 (15:05 +0200)]
Remove APACHE symbol

The APACHE symbol was used in very early PHP versions to indicate the
Apache module usage. Since PHP 4 this is no longer used in the code.

5 years agoRefactor genif.sh
Peter Kokot [Mon, 8 Jul 2019 12:58:26 +0000 (14:58 +0200)]
Refactor genif.sh

Changes:
- Coding style fixes
- ${1+"$@"} replaced with "$@" [1]
- EXTRA_MODULE_PTRS variable is not used anymore
- awk tool defined via environment variable
- srcdir determined automatically from the genif.sh location

[1] https://www.in-ulm.de/~mascheck/various/bourne_args/

Closes GH-4372

5 years agoMake busy wait busier
Nikita Popov [Mon, 8 Jul 2019 11:26:59 +0000 (13:26 +0200)]
Make busy wait busier

Another stab in the dark to fix the intermittent failures of timeout
tests on macos CI: We're using ITIMER_PROF, which means that the
timer counts against user+system time. The "busy" wait loop counts
against real time. Currently it calls microtime() on every iteration.
If that call is implemented as a syscall rather than going through
vDSO or commpage we might be seeing many context switches here which
drive up the real time, but not user or system time.

See if making the loop busier and calling microtime() less helps the
situation.

5 years agoDelay EG(exception) check on slow path
Dmitry Stogov [Mon, 8 Jul 2019 10:56:34 +0000 (13:56 +0300)]
Delay EG(exception) check on slow path

5 years agoDeprecate passing invalid character to base_convert etc
Scott Dutton [Fri, 28 Jun 2019 06:12:39 +0000 (07:12 +0100)]
Deprecate passing invalid character to base_convert etc

RFC: https://wiki.php.net/rfc/base_convert_improvements

5 years agoRemove C89 checks for signal.h and strerror
Peter Kokot [Mon, 8 Jul 2019 10:46:51 +0000 (12:46 +0200)]
Remove C89 checks for signal.h and strerror

These are part of the C89 and on today's systems not needed to be
checked anymore. This removes symbols HAVE_SIGNAL and HAVE_STRERROR.

- http://port70.net/~nsz/c/c89/c89-draft.html
- locale.h is also part of C89 but will be removed per request in PHP 8

5 years agoUpdate libmagic patch
Peter Kokot [Mon, 8 Jul 2019 10:38:47 +0000 (12:38 +0200)]
Update libmagic patch

This simplifies the libmagic patch:
- in upstream the HAVE_STRERROR check has been removed
- in upstream library the HAVE_SIGNAL_H has been removed
- indentations syncs with the upstream library
- some irrelevant changes removed from the patch (log comment), upstream
  has this correctly logged already so no need to patch the comment.

Closes GH-4298

5 years agoImplement FR #77230: Support custom CFLAGS and LDFLAGS from environment
Christoph M. Becker [Tue, 2 Jul 2019 17:08:19 +0000 (19:08 +0200)]
Implement FR #77230: Support custom CFLAGS and LDFLAGS from environment

While it is already possible to *set* CFLAGS and LDFLAGS (actually all
variables) from the environment for `nmake` (by passing the `/E`
option), it is not possible to *add* any (C|LD)FLAGS, which can be
useful in some cases.  Instead of allowing this for `nmake`, we add
support for additional custom (C|LD)FLAGS to `configure`, similar to
how that works on Linux, so one could actually write:
````
set CFLAGS=foo & set LDFLAGS=bar & configure
````
This also allows us to use these flags during configure.

5 years agoFix TsHashTable related race conditions
Christoph M. Becker [Mon, 1 Jul 2019 08:18:19 +0000 (10:18 +0200)]
Fix TsHashTable related race conditions

Although TsHashTable and the according API are supposed to easily make
a HashTable thread-safe, they do not; for instance, there can be race
conditions between finding and updating entries.  We therefore avoid
the usage of TsHashTable in favor of a HashTable with our own mutex
management.

The patch has been provided by krakjoe@php.net; I only did some minor
fixes and tweaks.

5 years agoSimplify PHP_CHECK_PDO_INCLUDES calls
Peter Kokot [Mon, 8 Jul 2019 08:23:09 +0000 (10:23 +0200)]
Simplify PHP_CHECK_PDO_INCLUDES calls

Conditional checks were once used for backwards compatibility with
phpize from PHP versions that didn't have this macro call yet.

Closes GH-4376

5 years agoFixed opcode description
Dmitry Stogov [Mon, 8 Jul 2019 08:20:46 +0000 (11:20 +0300)]
Fixed opcode description

5 years agoRemove some unused variables
Peter Kokot [Mon, 8 Jul 2019 08:18:17 +0000 (10:18 +0200)]
Remove some unused variables

- Variables php_abs_top_srcdir php_abs_top_builddir are no longer used.
- ZEND_EXT_TYPE is always zend_extension and variable is no longer used.

Closes GH-4378

5 years agoProvide argon2i(d) password hashing from sodium when needed
Sara Golemon [Fri, 5 Apr 2019 21:33:10 +0000 (17:33 -0400)]
Provide argon2i(d) password hashing from sodium when needed

5 years agoSimplify expression and remove the possibility of div by 0
Stanislav Malyshev [Sun, 7 Jul 2019 23:16:05 +0000 (16:16 -0700)]
Simplify expression and remove the possibility of div by 0

Maybe should use exp2() but not sure about how supported it is.

5 years agoRemove PHP_DEBUG_MACRO
Peter Kokot [Sun, 7 Jul 2019 04:11:10 +0000 (06:11 +0200)]
Remove PHP_DEBUG_MACRO

The macro is no longer used. The warning at the end of the configure
script therefore is also no longer used.

5 years agoRemove some more Apache 1 left overs
Peter Kokot [Sun, 7 Jul 2019 04:25:58 +0000 (06:25 +0200)]
Remove some more Apache 1 left overs

- warning in configure.ac is relevant for the sapi/apache
- errors output redirected to /dev/null when checking Apache version

5 years agoMention that zend_parse_parameters should not be tested
Nikita Popov [Sun, 7 Jul 2019 09:23:58 +0000 (11:23 +0200)]
Mention that zend_parse_parameters should not be tested

Also mention that --CREDITS-- section should not be included
anymore. We should also change qa.php.net to stop advertising
these.

[ci skip]

5 years agoMove footer to the end of configure output
Peter Kokot [Wed, 3 Jul 2019 22:18:15 +0000 (00:18 +0200)]
Move footer to the end of configure output

5 years agoRemove PTHREADS_ASSIGN_VARS
Peter Kokot [Mon, 1 Jul 2019 23:00:14 +0000 (01:00 +0200)]
Remove PTHREADS_ASSIGN_VARS

This simplifies TSRM build steps a bit and avoids doing unnecessary
steps:
- The `PTHREADS_CHECK_COMPILE` can called inside the for loops only
  since this is only where the `$pthreads_checked` variable is used.
- Assigning variables can be then done only in the configure.ac
  once.
- use `m4_include()` instead of the `sinclude()` in the middle of
  the build steps.
- The `$threads_result` variable is not used in the code or in
  extensions.

5 years agoRemove superfluous assignment
Christoph M. Becker [Fri, 5 Jul 2019 13:51:53 +0000 (15:51 +0200)]
Remove superfluous assignment

5 years agoEliminate useless checks
Dmitry Stogov [Fri, 5 Jul 2019 11:21:18 +0000 (14:21 +0300)]
Eliminate useless checks

5 years agoTemporarily skip test
Christoph M. Becker [Fri, 5 Jul 2019 10:44:55 +0000 (12:44 +0200)]
Temporarily skip test

This test hangs on Windows for ~10 minutes as of commit 30019f4, so we
temporarily skip it.  The issue will be investigated by Joe and myself
in due course.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 5 Jul 2019 10:07:45 +0000 (12:07 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Fri, 5 Jul 2019 10:07:10 +0000 (12:07 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

5 years agoBackport fe_reset_rw case
Nikita Popov [Fri, 5 Jul 2019 10:06:52 +0000 (12:06 +0200)]
Backport fe_reset_rw case

5 years agoMake sure all cases of fetch_dim_w adjustment are handled
Nikita Popov [Fri, 5 Jul 2019 10:02:26 +0000 (12:02 +0200)]
Make sure all cases of fetch_dim_w adjustment are handled

Use EMPTY_SWITCH_DEFAULT_CASE() to trigger an assertion in case
we miss something.

Add missing FE_RESET_RW case.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 5 Jul 2019 09:41:57 +0000 (11:41 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Fri, 5 Jul 2019 09:40:45 +0000 (11:40 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

5 years agoFix inference for compound object op on dim
Nikita Popov [Fri, 5 Jul 2019 09:39:42 +0000 (11:39 +0200)]
Fix inference for compound object op on dim

5 years agoOptimize integer in_array with strict=true
Nikita Popov [Fri, 5 Jul 2019 09:15:13 +0000 (11:15 +0200)]
Optimize integer in_array with strict=true

It doesn't make sense that using in_array with strict=false is
much faster for this case, due to lack of a specialized codepath.

5 years agoReplace ZEND_ASSIGN_ADD (and others) by ZEND_ASSIGN_OP, ZEND_ASSIGN_DIM_OP, ZEND_ASSG...
Dmitry Stogov [Fri, 5 Jul 2019 09:03:25 +0000 (12:03 +0300)]
Replace ZEND_ASSIGN_ADD (and others) by ZEND_ASSIGN_OP, ZEND_ASSIGN_DIM_OP, ZEND_ASSGIN_OBJ_OP and ZEND_ASSIGN_STATIC_PROP_OP

5 years agoAdd test
Nikita Popov [Fri, 5 Jul 2019 09:00:27 +0000 (11:00 +0200)]
Add test

Forgot to commit this.

5 years agoFix wrong size calculation related to function name
Nikita Popov [Fri, 5 Jul 2019 08:44:48 +0000 (10:44 +0200)]
Fix wrong size calculation related to function name

It would be nice if we could drop this manual function name reuse
code altogether and rely on interning for it.

5 years agoPreloading: Don't move conditional functions to back to scripts
Nikita Popov [Fri, 5 Jul 2019 08:41:39 +0000 (10:41 +0200)]
Preloading: Don't move conditional functions to back to scripts

Conditional function declaration may be referenced by functions or
classes that have been preloaded, so we should not move them back
to scripts.

What we probably should be doing though is to discard conditional
functions that are not used in the optimizer. This is probably
reasonably common for polyfills, where we will be able to const-eval
the conditions and drop the BBs declaring the functions, but won't
delete the function declarations themselves.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
George Wang [Thu, 4 Jul 2019 16:14:48 +0000 (12:14 -0400)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
George Wang [Thu, 4 Jul 2019 16:04:08 +0000 (12:04 -0400)]
Merge branch 'PHP-7.2' into PHP-7.3

5 years agoUpdated to LiteSpeed SAPI V7.4.3
George Wang [Thu, 4 Jul 2019 16:03:21 +0000 (12:03 -0400)]
Updated to LiteSpeed SAPI V7.4.3
Increased response header count limit from 100 to 1000.
Added crash handler to cleanly shutdown PHP request.
Added CloudLinux mod_lsapi mode
Fixed bug #76058

5 years agoCompact literals: Don't insert unmergeable keys
Nikita Popov [Thu, 4 Jul 2019 14:17:46 +0000 (16:17 +0200)]
Compact literals: Don't insert unmergeable keys

LITERAL_VALUE with related literals cannot be merged, avoid inserting
them in the literals hash in the first place. Otherwise we may end up
inserting the same key multiple times. We may also miss merging
opportunities due to the duplicate keys.

5 years agoAssert that HT entries using add_new APIs are really new
Nikita Popov [Thu, 4 Jul 2019 13:08:47 +0000 (15:08 +0200)]
Assert that HT entries using add_new APIs are really new

5 years agoImprove zend_binary_assign_op helpers.
Dmitry Stogov [Thu, 4 Jul 2019 14:25:43 +0000 (17:25 +0300)]
Improve zend_binary_assign_op helpers.
Reorder opcode numbers to make ADD-POW and ASSIGN_ADD-ASSIGN_POW opcodes sequencional.

5 years agoIntroduce and use ZEND_VM_INLINE_HANDLER() to avoid ZEND_RETURN exception
Dmitry Stogov [Thu, 4 Jul 2019 12:54:45 +0000 (15:54 +0300)]
Introduce and use ZEND_VM_INLINE_HANDLER() to avoid ZEND_RETURN exception

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Thu, 4 Jul 2019 12:50:51 +0000 (14:50 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  [ci skip] Remove NEWS entry

5 years ago[ci skip] Remove NEWS entry
Christoph M. Becker [Thu, 4 Jul 2019 12:50:23 +0000 (14:50 +0200)]
[ci skip] Remove NEWS entry

This commit already was contained in PHP 7.3.7, but doesn't need a NEWS
entry, since the regression had only been introduced with PHP 7.3.7RC1.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Thu, 4 Jul 2019 12:44:38 +0000 (14:44 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix typo in NEWS [skip ci]

5 years agoFix typo in NEWS [skip ci]
Fabien Villepinte [Thu, 4 Jul 2019 12:09:22 +0000 (14:09 +0200)]
Fix typo in NEWS [skip ci]