]> granicus.if.org Git - php/log
php
4 years agoUse ZPP callable check for spl_autoload_register.
George Peter Banyard [Thu, 26 Mar 2020 00:00:55 +0000 (01:00 +0100)]
Use ZPP callable check for spl_autoload_register.

This makes it always throw a TypeError, moreover this makes the
error message consistent.

Added a warning mentioning that the second parameter is now ignored
when passed false.

Closes GH-5301

4 years agoFix #79652 Ensure that the mixed type is displayed instead of the union of all types
Máté Kocsis [Fri, 29 May 2020 20:31:37 +0000 (22:31 +0200)]
Fix #79652 Ensure that the mixed type is displayed instead of the union of all types

Closes GH-56430

4 years agoUnbundle ext/xmlrpc
Christoph M. Becker [Fri, 29 May 2020 13:43:45 +0000 (15:43 +0200)]
Unbundle ext/xmlrpc

According to <https://wiki.php.net/rfc/unbundle_xmlprc> we unbundle
ext/xmlrpc.

4 years agoAdd upgrading notes about the deprecated functionality in ext/enchant
Máté Kocsis [Fri, 29 May 2020 13:15:27 +0000 (15:15 +0200)]
Add upgrading notes about the deprecated functionality in ext/enchant

[skip ci]

4 years agoConvert enchant resources to opaque objects
Máté Kocsis [Fri, 15 May 2020 06:38:02 +0000 (08:38 +0200)]
Convert enchant resources to opaque objects

Additionally, deprecate ENCHANT_MYSPELL and ENCHANT_ISPELL constants.
Closes GH-5577

Co-authored-by: Remi Collet <remi@php.net>
4 years agoSupport libzip 1.6 on Windows
Christoph M. Becker [Fri, 29 May 2020 11:42:18 +0000 (13:42 +0200)]
Support libzip 1.6 on Windows

4 years agoFix Windows build
Nikita Popov [Fri, 29 May 2020 10:58:31 +0000 (12:58 +0200)]
Fix Windows build

4 years agoFixed tracing JIT register allocator (failure on ext/opcache/tests/jit/assign_002...
Dmitry Stogov [Fri, 29 May 2020 10:27:47 +0000 (13:27 +0300)]
Fixed tracing JIT register allocator (failure on ext/opcache/tests/jit/assign_002.phpt)

4 years agoAllow tracing JIT generate code when function exits from VM (e.g. for magic __get...
Dmitry Stogov [Fri, 29 May 2020 10:25:59 +0000 (13:25 +0300)]
Allow tracing JIT generate code when function exits from VM (e.g. for magic __get/__set)

4 years agoRemove json checks in fuzzer SAPI
Nikita Popov [Fri, 29 May 2020 10:05:42 +0000 (12:05 +0200)]
Remove json checks in fuzzer SAPI

JSON is now always enabled

4 years agoDon't add guards that are not going to be checked
Dmitry Stogov [Fri, 29 May 2020 09:17:09 +0000 (12:17 +0300)]
Don't add guards that are not going to be checked

4 years agoFixed use-after-free in tracing JIT when recording closures and top-level op_arrays.
Dmitry Stogov [Thu, 28 May 2020 21:45:28 +0000 (00:45 +0300)]
Fixed use-after-free in tracing JIT when recording closures and top-level op_arrays.

4 years agoClean up calls to extension_loaded('json') in tests
Tyson Andre [Thu, 28 May 2020 16:53:12 +0000 (12:53 -0400)]
Clean up calls to extension_loaded('json') in tests

These are no longer needed after https://wiki.php.net/rfc/always_enable_json

Closes GH-5637

4 years agoFixed tracing JIT type inference for passing undefined CV by value
Dmitry Stogov [Thu, 28 May 2020 15:35:32 +0000 (18:35 +0300)]
Fixed tracing JIT type inference for passing undefined CV by value

4 years agoFixed incorrect trace type inference for top-level code
Dmitry Stogov [Thu, 28 May 2020 14:43:29 +0000 (17:43 +0300)]
Fixed incorrect trace type inference for top-level code

4 years agoFixed incorrect type inference
Dmitry Stogov [Thu, 28 May 2020 14:10:05 +0000 (17:10 +0300)]
Fixed incorrect type inference

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Thu, 28 May 2020 13:35:47 +0000 (15:35 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix PVS-Studio integration

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Thu, 28 May 2020 13:34:09 +0000 (15:34 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix PVS-Studio integration

4 years agoFix PVS-Studio integration
Christoph M. Becker [Thu, 28 May 2020 13:20:06 +0000 (15:20 +0200)]
Fix PVS-Studio integration

Without this configuration option, PVS-Studio looks for preprocessed
files (*.i), but these do not exists.

4 years agoBuild fix for newer versions of NetBSD.
David Carlier [Wed, 27 May 2020 22:26:13 +0000 (23:26 +0100)]
Build fix for newer versions of NetBSD.

its libutil contains newer conflicting apis as estrdup, emalloc.

Closes GH-5635

4 years agoEnsure Exception::getFile/getLine return type is correct
Nikita Popov [Thu, 28 May 2020 12:19:47 +0000 (14:19 +0200)]
Ensure Exception::getFile/getLine return type is correct

These return an untyped protected property, so we can't rely on
the type being correct.

Also add return types to the interface -- normally this would be
a no-go, but Throwable is a special interface that can only
be implemented internally, so we control all implementations.

4 years agoRun Symfony tests in per-component
Nicolas Grekas [Mon, 25 May 2020 11:33:50 +0000 (13:33 +0200)]
Run Symfony tests in per-component

4 years agoRe-enable Symfony test on PHP 8
Nicolas Grekas [Mon, 25 May 2020 08:20:30 +0000 (10:20 +0200)]
Re-enable Symfony test on PHP 8

4 years agoMake Exception::$previous a typed property
Nikita Popov [Thu, 28 May 2020 12:01:29 +0000 (14:01 +0200)]
Make Exception::$previous a typed property

Exception::$previous is a private property, so we can add a type:

    private ?Throwable $previous = null;

4 years agoMake Exception::$trace typed array property
Nikita Popov [Thu, 28 May 2020 10:23:37 +0000 (12:23 +0200)]
Make Exception::$trace typed array property

This is a private property, so we are allowed to add a type.
The new declaration of the property is:

    private array $trace = [];

This ensures that Exception::getTrace() does indeed return an array.

Userland code that was modifying the property through refleciton
may have to be adjusted to assign an array (instead of null,
for example).

Closes GH-5636.

4 years agoAvoid recording of uninitialized types.
Dmitry Stogov [Thu, 28 May 2020 11:39:41 +0000 (14:39 +0300)]
Avoid recording of uninitialized types.
VM doesn't set Z_TYPE() for IS_VAR when passes class_entry reference.

4 years agoAdd some mixed parameter types and fix UNKNOWN default values in ext/xmlrpc
Máté Kocsis [Thu, 28 May 2020 10:40:54 +0000 (12:40 +0200)]
Add some mixed parameter types and fix UNKNOWN default values in ext/xmlrpc

4 years agoExtract code for declaring Exception/Error properties
Nikita Popov [Thu, 28 May 2020 10:13:08 +0000 (12:13 +0200)]
Extract code for declaring Exception/Error properties

4 years agoConvert Exception::getMessage() result to string
Nikita Popov [Mon, 25 May 2020 10:10:41 +0000 (12:10 +0200)]
Convert Exception::getMessage() result to string

We specify that the return type of Exception::getMessage() is a
string. However, we don't currently ensure this, because
Exception::$message is a protected member that can be set to any
type. Fix this by performing an explicit type-cast.

This also requires a temporary refcount increment in the __toString()
object handler, because there is no additional owner of the object,
and it may get released prematurely as part of the __toString() call.

4 years agoSplit "opcache.jit_max_recursion_unroll" into "opcache.jit_max_recursive_calls" and...
Dmitry Stogov [Thu, 28 May 2020 09:28:05 +0000 (12:28 +0300)]
Split "opcache.jit_max_recursion_unroll" into "opcache.jit_max_recursive_calls" and "opcache.jit_max_recursive_returns".
It's possible to disable recording of "recursive return loops" setting opcache.jit_max_recursive_returns to 0.

4 years agoFix func info for sodium_crypto_aead_xchacha20poly1305_ietf_decrypt
Nicolas Grekas [Mon, 25 May 2020 12:40:18 +0000 (14:40 +0200)]
Fix func info for sodium_crypto_aead_xchacha20poly1305_ietf_decrypt

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 28 May 2020 08:20:12 +0000 (10:20 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Use automatic port assignment in socket_import/export test

4 years agoUse automatic port assignment in socket_import/export test
Nikita Popov [Thu, 28 May 2020 08:18:01 +0000 (10:18 +0200)]
Use automatic port assignment in socket_import/export test

4 years agoAdd a side exit on enter to function if it may be called with different number of...
Dmitry Stogov [Wed, 27 May 2020 22:22:32 +0000 (01:22 +0300)]
Add a side exit on enter to function if it may be called with different number of arguments.

4 years agoKeep information about SEND_UNPACK/SEND_ARRAY in call_info
Dmitry Stogov [Wed, 27 May 2020 19:15:14 +0000 (22:15 +0300)]
Keep information about SEND_UNPACK/SEND_ARRAY in call_info

4 years agoFixed tracing JIT support for ZEND_RETURN_BY_REF in CALL VM
Dmitry Stogov [Wed, 27 May 2020 15:04:16 +0000 (18:04 +0300)]
Fixed tracing JIT support for ZEND_RETURN_BY_REF in CALL VM

4 years agoFixed tracing JIT for CALL VM
Dmitry Stogov [Wed, 27 May 2020 14:05:06 +0000 (17:05 +0300)]
Fixed tracing JIT for CALL VM

4 years agoRevert "Fixed tracing JIT for CALL VM"
Dmitry Stogov [Wed, 27 May 2020 14:04:31 +0000 (17:04 +0300)]
Revert "Fixed tracing JIT for CALL VM"

This reverts commit 7f3a296f847de74f20f2e1fc64ad6ea706e33a12.

4 years agoalways build json statically
Remi Collet [Wed, 27 May 2020 13:36:07 +0000 (15:36 +0200)]
always build json statically

4 years ago[RFC] Always enable JSON support in php 8.0
Tyson Andre [Wed, 29 Apr 2020 22:35:52 +0000 (18:35 -0400)]
[RFC] Always enable JSON support in php 8.0

Currently, it's possible to disable the json extension with
`./configure --disable-json` (for historical reasons that no longer apply).
However, JSON is widely used in many use cases - web sites, logging output,
and as a data format that can be used to share data with many applications
and programming languages,
so I'd personally find it useful if it was always enabled.

Examples of where this would be useful:

- For internal classes to be able to implement `JsonSerializable`
  which currently requires a hard dependency on the JSON extension.
- For PHP users to publish single-file scripts that use json_encode and
  json_decode and don't require polyfills or less readable var_export output.
  (polyfills are less efficient and may have issues with recursive data
  structures)
- So that php-src's own modules, tools and test cases can start using JSON
  if it's a good choice for encoding a value. (same for PECLs)

https://wiki.php.net/rfc/jsond mentions that in PHP 5,

> The current Json Parser in the json extension does not have a free license
> which is a problem for many Linux distros.
> This has been referenced at Bug #63520.
> That results in not packaging json extension in the many Linux distributions.

Starting in php 7.0 with the switch to jsond,
It looks like licensing is no longer an issue.

Changes:

- Remove all flags related to JSON such as `configure --disable-json`
- Require that JSON be compiled statically instead of as a shared library

Examples of uses of JSON in various distros
(backwards incompatible changes such as changing packaging are typically
reserved for major versions, and 8.0 is a major version)

- JSON is required by `php-cli` or `php` in ubuntu:
  https://packages.ubuntu.com/focal/php/
- The php-json package has to be installed separately
  from the PHP binary in Fedora repos.

Closes GH-5495

4 years agoFixed tracing JIT for CALL VM
Dmitry Stogov [Wed, 27 May 2020 12:59:29 +0000 (15:59 +0300)]
Fixed tracing JIT for CALL VM

4 years agoMark several phpdbg tests as xfail
Christoph M. Becker [Tue, 26 May 2020 22:25:45 +0000 (00:25 +0200)]
Mark several phpdbg tests as xfail

Apparently, breakpoints and watchpoints are practically disabled if
run with OPcache JIT under Windows, so we mark the affected tests as
xfail in that case for the time being.

4 years agoAdd support for * width and precision in printf()
Nikita Popov [Tue, 21 Apr 2020 14:54:22 +0000 (16:54 +0200)]
Add support for * width and precision in printf()

If * is used for width/precision in printf, then the width/precision
is provided by a printf argument instead of being part of the format
string. Semantics generally match those of printf in C.

This can be used to easily reproduce PHP's float printing behavior:

    // Locale-sensitive using precision ini setting.
    // Used prior to PHP 8.0.
    sprintf("%.*G", (int) ini_get('precision'), $float);

    // Locale-insensitive using precision ini setting.
    // Used since to PHP 8.0.
    sprintf("%.*H", (int) ini_get('precision'), $float);

    // Locale-insensitive using serialize_precision ini setting.
    // Used in serialize(), json_encode() etc.
    sprintf("%.*H", (int) ini_get('serialize_precision'), $float);

Closes GH-5432.

4 years agoMerge branch 'PHP-7.4'
Dmitry Stogov [Wed, 27 May 2020 08:27:34 +0000 (11:27 +0300)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed possible usage of uninitialized value

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Dmitry Stogov [Wed, 27 May 2020 08:26:25 +0000 (11:26 +0300)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed possible usage of uninitialized value

4 years agoFixed possible usage of uninitialized value
Dmitry Stogov [Wed, 27 May 2020 08:25:18 +0000 (11:25 +0300)]
Fixed possible usage of uninitialized value

4 years agoAdd support for %h and %H in printf()
Nikita Popov [Wed, 22 Apr 2020 13:02:21 +0000 (15:02 +0200)]
Add support for %h and %H in printf()

These are locale-independent variants of %g and %G.

Closes GH-5436.

4 years agoReturn empty array instead of null from enchant APIs
Nikita Popov [Wed, 13 May 2020 13:29:30 +0000 (15:29 +0200)]
Return empty array instead of null from enchant APIs

Closes GH-5566.

4 years agoFixed JIT for ext/opcache/tests/bool_not_cv.phpt with opcache.jit=1202
Dmitry Stogov [Wed, 27 May 2020 07:57:33 +0000 (10:57 +0300)]
Fixed JIT for ext/opcache/tests/bool_not_cv.phpt with opcache.jit=1202

4 years agoTweak style and grammar in proc_open.c
Alex Dowad [Tue, 26 May 2020 13:37:09 +0000 (15:37 +0200)]
Tweak style and grammar in proc_open.c

4 years agoAvoid compiler warnings in proc_open.c
Alex Dowad [Tue, 26 May 2020 13:34:52 +0000 (15:34 +0200)]
Avoid compiler warnings in proc_open.c

We are getting a lot of compiler warnings when building on Appveyor CI (Windows).
Fix some of them.

Closes GH-5629

4 years agoFixed JIT for ext/opcache/tests/jit/cmp_004.phpt with opcache.jit=1201
Dmitry Stogov [Wed, 27 May 2020 06:59:12 +0000 (09:59 +0300)]
Fixed JIT for ext/opcache/tests/jit/cmp_004.phpt with opcache.jit=1201

4 years agoSet proper jit_extension for inherited methods
Dmitry Stogov [Wed, 27 May 2020 06:58:03 +0000 (09:58 +0300)]
Set proper jit_extension for inherited methods

4 years agoLet's try to fix the JIT compiler warning
Máté Kocsis [Tue, 26 May 2020 18:56:29 +0000 (20:56 +0200)]
Let's try to fix the JIT compiler warning

4 years agoImprove type error messages when an object is given
Máté Kocsis [Mon, 25 May 2020 17:28:15 +0000 (19:28 +0200)]
Improve type error messages when an object is given

From now on, we always display the given object's type instead of just reporting "object".
Additionally, make the format of return type errors match the format of argument errors.

Closes GH-5625

4 years agoFix picky builds
Christoph M. Becker [Tue, 26 May 2020 16:37:29 +0000 (18:37 +0200)]
Fix picky builds

Due to `-Werror=maybe-uninitialized` a bogus warning may be thrown, so
we initialize the variable to work-around that.

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Tue, 26 May 2020 15:46:56 +0000 (17:46 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Enable phpdbg tests on AppVeyor
  Make phpdbg test portable
  Fix several mostly Windows related phpdbg bugs
  Fix #73926: phpdbg will not accept input on restart execution

4 years agoEnable phpdbg tests on AppVeyor
Christoph M. Becker [Mon, 25 May 2020 22:16:36 +0000 (00:16 +0200)]
Enable phpdbg tests on AppVeyor

4 years agoMake phpdbg test portable
Christoph M. Becker [Mon, 25 May 2020 22:13:54 +0000 (00:13 +0200)]
Make phpdbg test portable

4 years agoFix several mostly Windows related phpdbg bugs
Christoph M. Becker [Mon, 25 May 2020 17:12:24 +0000 (19:12 +0200)]
Fix several mostly Windows related phpdbg bugs

* Properly initialize PHPDBG_G(watch_tmp)

  Otherwise that may cause segfaults in ZTS builds.

* Deactivate potentially remaining watchpoints after REPL

  Otherwise the memory could still be protected, resulting in segfaults
  during shutdown.

* NULL zend_handlers_table after freeing

  As of commit 4130fe4[1], the `zend_handlers_table` is explicitly
  freed in the `zend_vm_dtor()`.  Since phpdbg (and maybe some other
  SAPIs) may restart the engine afterwards, we have to make sure that
  the table is also NULLed.

* Only set context option if there is a context

  In other words, we must not follow the null pointer.

* Cater to file handles without attached console

  File handles do not necessarily have an attached console (for
  instance, pipes do not), in which case `GetConsoleScreenBufferInfo()`
  fails.  In this case we set a default value (`40`) for lines like on
  other systems.

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

4 years agoFix #73926: phpdbg will not accept input on restart execution
Christoph M. Becker [Tue, 19 May 2020 12:45:47 +0000 (14:45 +0200)]
Fix #73926: phpdbg will not accept input on restart execution

We are more liberal, and accept Windows line endings (CRLF) as well.

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Tue, 26 May 2020 15:21:29 +0000 (17:21 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix #79595: zend_init_fpu() alters FPU precision

4 years agoFix #79595: zend_init_fpu() alters FPU precision
Christoph M. Becker [Tue, 26 May 2020 06:57:31 +0000 (08:57 +0200)]
Fix #79595: zend_init_fpu() alters FPU precision

On startup, PHP deliberately changes the floating point control word to
enforce binary64 format for the calculations for best consistency
across platforms.  However, this is unnessary for x86_64 architectures,
because in this case SSE instructions are used by default, and there is
no good reason to pass `-mfpmath=i387` or such.

Therefore, we can skip the modification, which has the benefit that
system libraries are free to work in the mode of their liking.

4 years agoFixed JIT for integer overflow checks
Dmitry Stogov [Tue, 26 May 2020 14:59:15 +0000 (17:59 +0300)]
Fixed JIT for integer overflow checks

4 years agoFix variable type
Nikita Popov [Tue, 26 May 2020 13:58:00 +0000 (15:58 +0200)]
Fix variable type

This is no longer a boolean.

4 years agoAllow generators to have a real return type of `mixed` or `object`
Tyson Andre [Mon, 25 May 2020 20:38:08 +0000 (16:38 -0400)]
Allow generators to have a real return type of `mixed` or `object`

Fixes an edge case overlooked in
https://github.com/php/php-src/pull/5313

Generators are objects, so `object` should have also been allowed in addition to
`iterable` and `Traversable`

Closes GH-5626

4 years agoMerge branch 'PHP-7.4'
Derick Rethans [Tue, 26 May 2020 13:20:24 +0000 (14:20 +0100)]
Merge branch 'PHP-7.4'

4 years agoAdd (expected) release date, and new header for 7.4.8
Derick Rethans [Tue, 26 May 2020 13:20:06 +0000 (14:20 +0100)]
Add (expected) release date, and new header for 7.4.8

4 years agoThis bug fix was cherry picked into 7.4.6
Derick Rethans [Tue, 26 May 2020 13:18:19 +0000 (14:18 +0100)]
This bug fix was cherry picked into 7.4.6

4 years agoSupport catching exceptions without capturing them to variables
Max Semenik [Fri, 3 Apr 2020 21:22:17 +0000 (17:22 -0400)]
Support catching exceptions without capturing them to variables

RFC: https://wiki.php.net/rfc/non-capturing_catches

Closes GH-5345.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Tue, 26 May 2020 13:03:26 +0000 (15:03 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Respect typed references in catch assignment

4 years agoRespect typed references in catch assignment
Nikita Popov [Tue, 26 May 2020 12:59:40 +0000 (14:59 +0200)]
Respect typed references in catch assignment

I decided to null out EG(exception) early here, which means only
the exception from the dtor / ref assign is preserved, and the
previous exception is not chained in. This is more robust, and
I don't think this situation is common enough to be bothered about
the precise behavior.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Tue, 26 May 2020 12:44:09 +0000 (14:44 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix zend_assign_to_typed_ref() implementation

4 years agoFix zend_assign_to_typed_ref() implementation
Nikita Popov [Tue, 26 May 2020 12:06:36 +0000 (14:06 +0200)]
Fix zend_assign_to_typed_ref() implementation

There was some confusion going on here regarding the original
value vs the copied value.

I've dropped the needs_copy variable, because this code is not
inlined, so it would always be true anyway.

What we need to do is perform a move-assignment of the copied
value (in which case we don't care about performing the assignment
before destroying garbage), and destroying the original value
for the VAR/TMP cases. This is a bit complicated by the fact that
references are passed in via a separate ref variable, so we can't
just ptr_dtor the original variable.

4 years agoFixed JIT for (LONG_MIN % -1)
Dmitry Stogov [Tue, 26 May 2020 11:49:29 +0000 (14:49 +0300)]
Fixed JIT for (LONG_MIN % -1)

4 years agoMerge branch 'PHP-7.4'
Derick Rethans [Tue, 26 May 2020 10:47:43 +0000 (11:47 +0100)]
Merge branch 'PHP-7.4'

4 years agoFixed historical dates in NEWS
Derick Rethans [Tue, 26 May 2020 10:47:26 +0000 (11:47 +0100)]
Fixed historical dates in NEWS

4 years agoClarify ZEND_CATCH code
Nikita Popov [Tue, 26 May 2020 09:33:50 +0000 (11:33 +0200)]
Clarify ZEND_CATCH code

UNDEF the opcode result instead of addref'ing the exception.

4 years agoImprove language in error messages
Max Semenik [Sat, 23 May 2020 18:43:03 +0000 (14:43 -0400)]
Improve language in error messages

Closes GH-5617

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Tue, 26 May 2020 08:58:45 +0000 (10:58 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  7.3.20 will be next

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 26 May 2020 08:56:28 +0000 (10:56 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  7.3.20 will be next

4 years ago7.3.20 will be next
Christoph M. Becker [Tue, 26 May 2020 08:53:22 +0000 (10:53 +0200)]
7.3.20 will be next

4 years agoFixed JIT for SEND_VAR $undefined_cv
Dmitry Stogov [Tue, 26 May 2020 07:13:57 +0000 (10:13 +0300)]
Fixed JIT for SEND_VAR $undefined_cv

4 years agoRevert "Fixed JIT for SEND_VAR $undefined_cv"
Nikita Popov [Mon, 25 May 2020 21:50:53 +0000 (23:50 +0200)]
Revert "Fixed JIT for SEND_VAR $undefined_cv"

This reverts commit d60988257bb335dce16ff44722bd52ee49738d78.

This change causes segfaults in many tests.

4 years agoFixed tracing JIT for RETRUN $undefined_cv
Dmitry Stogov [Mon, 25 May 2020 19:19:13 +0000 (22:19 +0300)]
Fixed tracing JIT for RETRUN $undefined_cv

4 years agoproc_open FreeBSD build fix
David Carlier [Mon, 25 May 2020 14:31:34 +0000 (15:31 +0100)]
proc_open FreeBSD build fix

On this platform the needed header is different.

Closes GH-5623

4 years agoAnnotate internal functions with the mixed type
Máté Kocsis [Mon, 25 May 2020 15:30:49 +0000 (17:30 +0200)]
Annotate internal functions with the mixed type

Closes GH-5618

4 years agoFix ZPP of v*printf()
Máté Kocsis [Mon, 25 May 2020 15:29:46 +0000 (17:29 +0200)]
Fix ZPP of v*printf()

4 years agoPromote warning related to operator overloading in ext/gmp to an exception
Máté Kocsis [Mon, 25 May 2020 15:12:52 +0000 (17:12 +0200)]
Promote warning related to operator overloading in ext/gmp to an exception

4 years agoFixed JIT for SEND_VAR $undefined_cv
Dmitry Stogov [Mon, 25 May 2020 15:24:50 +0000 (18:24 +0300)]
Fixed JIT for SEND_VAR $undefined_cv

4 years agoZEND_ACC_IMMUTABLE may be reset for closures
Dmitry Stogov [Mon, 25 May 2020 14:45:13 +0000 (17:45 +0300)]
ZEND_ACC_IMMUTABLE may be reset for closures

4 years agoKeep trace number in EG(jit_trace_num) instead of EG(reserved)[zend_func_info_rid]
Dmitry Stogov [Mon, 25 May 2020 14:05:26 +0000 (17:05 +0300)]
Keep trace number in EG(jit_trace_num) instead of EG(reserved)[zend_func_info_rid]

4 years agoCheck for ZEND_HANDLE_EXCEPTION opcode before accessing opline trace info.
Dmitry Stogov [Mon, 25 May 2020 13:45:45 +0000 (16:45 +0300)]
Check for ZEND_HANDLE_EXCEPTION opcode before accessing opline trace info.

4 years agoReplace warning code by side exit to VM
Dmitry Stogov [Mon, 25 May 2020 12:14:27 +0000 (15:14 +0300)]
Replace warning code by side exit to VM

4 years agoReorder conditions to save one instruction in recursive return loop
Dmitry Stogov [Mon, 25 May 2020 09:55:03 +0000 (12:55 +0300)]
Reorder conditions to save one instruction in recursive return loop

4 years agoPGSQL and POD_SQL: don't include pg_config.h
Christoph M. Becker [Mon, 25 May 2020 07:00:32 +0000 (09:00 +0200)]
PGSQL and POD_SQL: don't include pg_config.h

Even if that header file is available, we better consider it private,
and don't include it.  The information about whether SSL support is
enabled is now missing (`USE_(OPEN)SSL`), and it seems there is no
alternative way to get it (`PQinitSSL()` is always defined), so we
remove it from the PHP info.  Furthermore, the `PG_VERSION` and
`PG_VERSION_STR` macros are no longer available, but as of libpq 9.1
there is `PQlibVersion()` which allows us to construct `PG_VERSION` in
a most likely backwards compatible manner.  The additional information
available through `PG_VERSION_STR` is lost, though, so we define
`PGSQL_LIBPQ_VERSION_STR` basically as alias of `PGSQL_LIBPQ_VERSION`,
and deprecate it right away.

Since we are now requiring at least libpq 9.1, we can remove some
further compatibility code and additional checks.

Regarding the raised requirements: official support for PostGreSQL 9.0
ended on 2015-10-08, and even CentOS 7 already has PostGreSQL 9.2, so
this is not supposed to be too much of an issue.

4 years agoFail in `./configure` when no opcache shm backends exist
Tyson Andre [Fri, 22 May 2020 21:36:32 +0000 (17:36 -0400)]
Fail in `./configure` when no opcache shm backends exist

This can be seen when the `./configure` step fails to detect `HAVE_SHM_*`,
e.g. due to missing a necessary dependency to compile the test scripts.
(Run `./configure`, run `yum install libtool-ltdl-devel` for missing dependencies,
then run `make`, and php can end up built with 0 shared memory opcache caches)

Give a clearer error message than `unknown`
Searching for `opcache "Fatal Error Unable to allocate shared memory segment of"
"unknown: No such file or directory"` reveals issues such as
https://github.com/termux/termux-packages/issues/2234

Closes GH-5615

4 years agoRefactor ZPP API to use uint32_t as everywhere else
George Peter Banyard [Wed, 20 May 2020 21:46:09 +0000 (23:46 +0200)]
Refactor ZPP API to use uint32_t as everywhere else

Closes GH-5609

4 years ago[skip-ci] Update UPGRADING
George Peter Banyard [Fri, 22 May 2020 15:02:25 +0000 (17:02 +0200)]
[skip-ci] Update UPGRADING

Add upgrading note for mixed type and removal of curly braces offset syntax

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Fri, 22 May 2020 14:57:24 +0000 (16:57 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Revert "Fix #79595: zend_init_fpu() alters FPU precision"