]> granicus.if.org Git - php/log
php
4 years agoMerge branch 'PHP-7.4' into master
Christoph M. Becker [Tue, 4 Aug 2020 10:34:54 +0000 (12:34 +0200)]
Merge branch 'PHP-7.4' into master

* PHP-7.4:
  [ci skip] Fix 7.3.21 release date

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

* PHP-7.3:
  [ci skip] Fix 7.3.21 release date

4 years ago[ci skip] Fix 7.3.21 release date
Christoph M. Becker [Tue, 4 Aug 2020 10:31:08 +0000 (12:31 +0200)]
[ci skip] Fix 7.3.21 release date

4 years agoFix opcache JIT on NetBSD with PaX
David Carlier [Mon, 3 Aug 2020 19:49:58 +0000 (20:49 +0100)]
Fix opcache JIT on NetBSD with PaX

When PaX mprotect active, opcache JIT test fail as it needs
the PROT_MPROTECT macro to be able to allow further permission
promotion with mprotect.

Closes GH-5929.

4 years agoXFAIL status-listen FPM test
Nikita Popov [Tue, 4 Aug 2020 08:27:33 +0000 (10:27 +0200)]
XFAIL status-listen FPM test

Has frequent intermittent failures with:

ERROR: The NOTICE does not match expected message:
- PATTERN: /^\[\d\d-\w\w\w-\d{4} \d\d:\d\d:\d\d\] NOTICE: Terminating ...$/
- MESSAGE: [04-Aug-2020 08:15:37] WARNING: [pool unconfined_status] server reached max_children setting (2), consider raising it
- EXPECT: 'Terminating ...'
- ACTUAL: '2020 08:15:37] WARNING: [pool unconfined_status] server reached max_children setting (2), consider raising it'

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Tue, 4 Aug 2020 08:26:27 +0000 (10:26 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Manually build re2c on macos

4 years agoManually build re2c on macos
Nikita Popov [Tue, 4 Aug 2020 08:05:23 +0000 (10:05 +0200)]
Manually build re2c on macos

Avoid issues with the licensing mafia, see:
https://github.com/Homebrew/homebrew-core/pull/59094

Closes GH-5932.

4 years agoAdd opcache.jit=tracing|function values, make on/yes/true synonym for tracing.
Benjamin Eberlei [Fri, 31 Jul 2020 11:27:32 +0000 (13:27 +0200)]
Add opcache.jit=tracing|function values, make on/yes/true synonym for tracing.

4 years agoMerge branch 'PHP-7.4'
Remi Collet [Tue, 4 Aug 2020 07:56:07 +0000 (09:56 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  bump version to 7.2.34-dev
  Update NEWS

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Remi Collet [Tue, 4 Aug 2020 07:55:50 +0000 (09:55 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  bump version to 7.2.34-dev
  Update NEWS

4 years agoMerge branch 'PHP-7.2' into PHP-7.3
Remi Collet [Tue, 4 Aug 2020 07:55:40 +0000 (09:55 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  bump version to 7.2.34-dev
  Update NEWS

4 years agobump version to 7.2.34-dev
Remi Collet [Tue, 4 Aug 2020 07:50:07 +0000 (09:50 +0200)]
bump version to 7.2.34-dev

4 years agoFix Socket related tests on Windows
Máté Kocsis [Tue, 4 Aug 2020 07:25:41 +0000 (09:25 +0200)]
Fix Socket related tests on Windows

4 years agoCleanup snmp after resource to object migration
Máté Kocsis [Tue, 4 Aug 2020 07:14:12 +0000 (09:14 +0200)]
Cleanup snmp after resource to object migration

4 years agoFix posix test
Máté Kocsis [Tue, 4 Aug 2020 07:11:43 +0000 (09:11 +0200)]
Fix posix test

4 years agoFix Windows build
Christoph M. Becker [Mon, 3 Aug 2020 22:09:12 +0000 (00:09 +0200)]
Fix Windows build

4 years agoAdd upgrading note for the resource to object migration in ext/sockets
Máté Kocsis [Mon, 3 Aug 2020 21:41:00 +0000 (23:41 +0200)]
Add upgrading note for the resource to object migration in ext/sockets

4 years agoMinor grammar/consistency fixes in upgrade guide
Theodore Brown [Mon, 3 Aug 2020 21:33:16 +0000 (15:33 -0600)]
Minor grammar/consistency fixes in upgrade guide

[ci skip]

4 years agoConvert resources to objects in ext/sockets
Máté Kocsis [Mon, 27 Jul 2020 19:23:27 +0000 (21:23 +0200)]
Convert resources to objects in ext/sockets

Closes GH-5900.

4 years agoDeprecate libxml_disable_entity_loader()
Dik Takken [Thu, 16 Jul 2020 12:20:41 +0000 (14:20 +0200)]
Deprecate libxml_disable_entity_loader()

This method was used to protect code against XXE processing attacks.
Since PHP now requires libxml >= 2.9.0 external entity loading no longer
needs to be disabled to prevent these attacks. It is disabled by default.
Also, the method has an unwanted side effect that causes a lot of
confusion: Parsing XML data from resources like files is no longer possible.

Closes GH-5867.

4 years agoBump libxml version requirement 2.7.6 => 2.9.0
Dik Takken [Thu, 16 Jul 2020 12:19:40 +0000 (14:19 +0200)]
Bump libxml version requirement 2.7.6 => 2.9.0

Since libxml version 2.9.0 external entity loading is disabled by default.
Bumping the version requirement means that XML processing in PHP is no
longer vulnerable to XXE processing attacks by default.

4 years agoFPM: Add pm.status_listen option
Jakub Zelenka [Sat, 1 Aug 2020 13:39:33 +0000 (14:39 +0100)]
FPM: Add pm.status_listen option

This option allows getting status from different endpoint (e.g. port
or UDS file) which is useful for getting status when all children are
busy with serving long running requests.

Internally a new shared pool with ondemand process manager is used. It
means that the status requests have reserved resources and should not
be blocked by other requests.

4 years agoPromote warnings to exceptions in ext/gettext, ext/sysvmsg and ext/xml
Máté Kocsis [Sun, 2 Aug 2020 22:55:02 +0000 (00:55 +0200)]
Promote warnings to exceptions in ext/gettext, ext/sysvmsg and ext/xml

Closes GH-5926

4 years ago[RFC] Only unserialize Phar metadata when getMetadata() is called
Tyson Andre [Tue, 7 Jul 2020 22:47:52 +0000 (18:47 -0400)]
[RFC] Only unserialize Phar metadata when getMetadata() is called

In other words, don't automatically unserialize when the magic
phar:// stream wrappers are used.
RFC: https://wiki.php.net/rfc/phar_stop_autoloading_metadata

Also, change the signature from `getMetadata()`
to `getMetadata(array $unserialize_options = [])`.
Start throwing earlier if setMetadata() is called and serialization threw.

See https://externals.io/message/110856 and
https://bugs.php.net/bug.php?id=76774

This was refactored to add a phar_metadata_tracker for the following reasons:
- The way to properly copy a zval was previously implicit and undocumented
  (e.g. is it a pointer to a raw string or an actual value)
- Avoid unnecessary serialization and unserialization in the most common case
- If a metadata value is serialized once while saving a new/modified phar file,
  this allows reusing the same serialized string.
- Have as few ways to copy/clone/lazily parse metadata (etc.) as possible,
  so that code changes can be limited to only a few places in the future.
- Performance is hopefully not a concern - copying a string should be faster
  than unserializing a value, and metadata should be rare in most cases.

Remove unnecessary skip in a test(Compression's unused)

Add additional assertions about usage of persistent phars

Improve robustness of `Phar*->setMetadata()`

- Add sanity checks for edge cases freeing metadata, when destructors
  or serializers modify the phar recursively.
- Typical use cases of php have phar.readonly=1 and would not be affected.

Closes GH-5855

4 years agoMake http stream wrapper advertise HTTP/1.1 by default
Rowan Tommins [Thu, 11 Jun 2020 18:05:00 +0000 (19:05 +0100)]
Make http stream wrapper advertise HTTP/1.1 by default

In practice, we always act as an HTTP/1.1 client, for compatibility
with servers which ignore protocol version. Sending the version in
the request will avoid problems with servers which don't ignore it.

HTTP/1.0 can still be forced using a stream context option.

Closes GH-5899.

4 years agoMerge branch 'levim/assert-throw'
Levi Morrison [Mon, 3 Aug 2020 14:04:14 +0000 (08:04 -0600)]
Merge branch 'levim/assert-throw'

This changes assert.exception to default to 1, or on by default.
Closes GH-5925.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Mon, 3 Aug 2020 13:15:04 +0000 (15:15 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Removed space from bug55086.phpt

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Mon, 3 Aug 2020 13:14:36 +0000 (15:14 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Removed space from bug55086.phpt

4 years agoRemoved space from bug55086.phpt
Graham Campbell [Sun, 2 Aug 2020 11:04:11 +0000 (12:04 +0100)]
Removed space from bug55086.phpt

Closes GH-5923.

4 years agoFix #79923: fix socket_set_option_bindtodevice test
Santiago M. Mola [Sat, 1 Aug 2020 16:26:57 +0000 (18:26 +0200)]
Fix #79923: fix socket_set_option_bindtodevice test

Closes GH-5924.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Mon, 3 Aug 2020 12:56:57 +0000 (14:56 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix bug #79924

4 years agoFix bug #79924
Nikita Popov [Mon, 3 Aug 2020 12:55:18 +0000 (14:55 +0200)]
Fix bug #79924

Move functions that are only used with ipv6 support under
HAVE_IPV6 checks.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Mon, 3 Aug 2020 12:48:40 +0000 (14:48 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  set -ex on travis/compile.sh

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Mon, 3 Aug 2020 12:48:18 +0000 (14:48 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  set -ex on travis/compile.sh

4 years agoset -ex on travis/compile.sh
Santiago M. Mola [Sat, 1 Aug 2020 15:43:08 +0000 (17:43 +0200)]
set -ex on travis/compile.sh

-e to fail early: ./configure may fail and further errors from make bury
the original problem in the logs.

-x for easier debugging

4 years agoPromote "undefined array key" notice to warning
Nikita Popov [Mon, 3 Aug 2020 09:26:54 +0000 (11:26 +0200)]
Promote "undefined array key" notice to warning

This implements the last remaining part of the
https://wiki.php.net/rfc/engine_warnings RFC.

Closes GH-5927.

4 years agoFix fix for bug #79877 for PHP 8
Christoph M. Becker [Mon, 3 Aug 2020 10:01:12 +0000 (12:01 +0200)]
Fix fix for bug #79877 for PHP 8

PHP 8 is supposed to throw here.

4 years agoDon't suppress notices in rfc1867 tests
Nikita Popov [Mon, 3 Aug 2020 09:58:28 +0000 (11:58 +0200)]
Don't suppress notices in rfc1867 tests

The references notices in debug builds don't seem to be present
anymore.

4 years agoMerge branch 'PHP-7.4' into master
Christoph M. Becker [Mon, 3 Aug 2020 09:21:39 +0000 (11:21 +0200)]
Merge branch 'PHP-7.4' into master

* PHP-7.4:
  [ci skip] Add missing NEWS entries

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 3 Aug 2020 09:18:45 +0000 (11:18 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  [ci skip] Add missing NEWS entries

4 years ago[ci skip] Add missing NEWS entries
Christoph M. Becker [Mon, 3 Aug 2020 09:08:31 +0000 (11:08 +0200)]
[ci skip] Add missing NEWS entries

4 years agoConvert SPL illegal offset type into TypeError
Nikita Popov [Mon, 3 Aug 2020 09:16:59 +0000 (11:16 +0200)]
Convert SPL illegal offset type into TypeError

Make this consistent with the corresponding engine behavior.
Also adjust the messages to match.

4 years agoMerge branch 'PHP-7.4' into master
Christoph M. Becker [Mon, 3 Aug 2020 09:15:24 +0000 (11:15 +0200)]
Merge branch 'PHP-7.4' into master

* PHP-7.4:
  Fix #79877: getimagesize function silently truncates after a null byte
  Fix #79797: Use of freed hash key in the phar_parse_zipfile function
  Fix #79877: getimagesize function silently truncates after a null byte
  Fix #79797: Use of freed hash key in the phar_parse_zipfile function

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 3 Aug 2020 09:13:49 +0000 (11:13 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79877: getimagesize function silently truncates after a null byte
  Fix #79797: Use of freed hash key in the phar_parse_zipfile function

4 years agodatetime: new format "p", same as "P" but returning "Z" for UTC
Gregor Harlan [Sun, 26 Jul 2020 18:29:40 +0000 (20:29 +0200)]
datetime: new format "p", same as "P" but returning "Z" for UTC

4 years agoFix bug #79925
Nikita Popov [Mon, 3 Aug 2020 08:34:39 +0000 (10:34 +0200)]
Fix bug #79925

If the expected return type of a magic method is "object", we also
need to allow class types and "static" to comply with covariance.

4 years agoEnforce __set_state() parameter type
Nikita Popov [Mon, 3 Aug 2020 08:23:06 +0000 (10:23 +0200)]
Enforce __set_state() parameter type

This fixes one of the issues reported in bug #79925. The parameter
type check for this particular method was missed.

4 years agoFix handling of nullsafe method in empty()
Nikita Popov [Mon, 3 Aug 2020 08:16:04 +0000 (10:16 +0200)]
Fix handling of nullsafe method in empty()

Fixes oss-fuzz #24627.

4 years agoUpdate NEWS
Stanislav Malyshev [Mon, 3 Aug 2020 08:14:38 +0000 (01:14 -0700)]
Update NEWS

4 years agoFix #79877: getimagesize function silently truncates after a null byte
Christoph M. Becker [Tue, 21 Jul 2020 09:07:43 +0000 (11:07 +0200)]
Fix #79877: getimagesize function silently truncates after a null byte

We have to check for NUL bytes if `getimagesize()` has been called.

4 years agoFix #79797: Use of freed hash key in the phar_parse_zipfile function
Christoph M. Becker [Tue, 14 Jul 2020 15:04:24 +0000 (17:04 +0200)]
Fix #79797: Use of freed hash key in the phar_parse_zipfile function

We must not use heap memory after we freed it.

4 years agoFix #79877: getimagesize function silently truncates after a null byte
Christoph M. Becker [Tue, 21 Jul 2020 09:07:43 +0000 (11:07 +0200)]
Fix #79877: getimagesize function silently truncates after a null byte

We have to check for NUL bytes if `getimagesize()` has been called.

4 years agoFix #79797: Use of freed hash key in the phar_parse_zipfile function
Christoph M. Becker [Tue, 14 Jul 2020 15:04:24 +0000 (17:04 +0200)]
Fix #79797: Use of freed hash key in the phar_parse_zipfile function

We must not use heap memory after we freed it.

4 years agoMerge branch 'PHP-7.4' into master
Christoph M. Becker [Mon, 3 Aug 2020 07:15:50 +0000 (09:15 +0200)]
Merge branch 'PHP-7.4' into master

* PHP-7.4:
  Enable libxml entity loader test case on Windows

4 years agoEnable libxml entity loader test case on Windows
Christoph M. Becker [Mon, 3 Aug 2020 07:12:46 +0000 (09:12 +0200)]
Enable libxml entity loader test case on Windows

4 years agoMerge branch 'PHP-7.2' into PHP-7.3
Stanislav Malyshev [Mon, 3 Aug 2020 06:56:37 +0000 (23:56 -0700)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix #79877: getimagesize function silently truncates after a null byte
  Fix #79797: Use of freed hash key in the phar_parse_zipfile function

4 years agoDrop the unneeded pointer casting
tangl163 [Sat, 1 Aug 2020 03:56:16 +0000 (11:56 +0800)]
Drop the unneeded pointer casting

The standard says that "A pointer to void may be converted to or from a
pointer to any object type". So the casting is unneeded.

REF:
    * c11: http://port70.net/~nsz/c/c11/n1570.html#6.3.2.3p1
    * c99: http://port70.net/~nsz/c/c99/n1256.html

Closes GH-5916

4 years agoFixed bug #60302: DateTime::createFromFormat should new static(), not new self()
Derick Rethans [Sun, 2 Aug 2020 23:41:31 +0000 (00:41 +0100)]
Fixed bug #60302: DateTime::createFromFormat should new static(), not new self()

Also fixes similar issues for DateTimeImmutable::createFromFormat,
DateTime::createFromImmmutable, DateTime::createFromInterface,
DateTimeImmutable::createFromMutable, and
DateTimeImmutable::createFromInterface.

4 years agoFix stub hash of ext/ldap
Máté Kocsis [Sun, 2 Aug 2020 23:06:21 +0000 (01:06 +0200)]
Fix stub hash of ext/ldap

4 years agoAdd a bunch of missing argument types to stubs
Máté Kocsis [Sun, 2 Aug 2020 22:45:51 +0000 (00:45 +0200)]
Add a bunch of missing argument types to stubs

4 years agoImprove a few parameter names in ext/spl
Máté Kocsis [Sun, 2 Aug 2020 22:45:12 +0000 (00:45 +0200)]
Improve a few parameter names in ext/spl

Use the same names which are used by zend functions.

4 years agoConvert the $ttl parameter of ldap_exop_refresh() to int
Máté Kocsis [Sun, 2 Aug 2020 22:38:59 +0000 (00:38 +0200)]
Convert the $ttl parameter of ldap_exop_refresh() to int

4 years agoFix #79877: getimagesize function silently truncates after a null byte
Christoph M. Becker [Tue, 21 Jul 2020 09:07:43 +0000 (11:07 +0200)]
Fix #79877: getimagesize function silently truncates after a null byte

We have to check for NUL bytes if `getimagesize()` has been called.

4 years agoFix #79797: Use of freed hash key in the phar_parse_zipfile function
Christoph M. Becker [Tue, 14 Jul 2020 15:04:24 +0000 (17:04 +0200)]
Fix #79797: Use of freed hash key in the phar_parse_zipfile function

We must not use heap memory after we freed it.

4 years agoDefault assert.exception to 1
Levi Morrison [Sun, 2 Aug 2020 19:34:53 +0000 (13:34 -0600)]
Default assert.exception to 1

4 years agoBump timeouts, again
Nikita Popov [Sun, 2 Aug 2020 08:10:54 +0000 (10:10 +0200)]
Bump timeouts, again

Now that we're testing an additional JIT configuration in nightly
builds, the jobs are running close to an hour.

[ci skip]

4 years agoEnsure correct signatures for magic methods
Gabriel Caruso [Fri, 31 May 2019 03:45:32 +0000 (00:45 -0300)]
Ensure correct signatures for magic methods

4 years ago[skip ci] Fix grammar/typo nits in docs
Tyson Andre [Sat, 1 Aug 2020 15:44:03 +0000 (11:44 -0400)]
[skip ci] Fix grammar/typo nits in docs

The PHP error message says "well-formed", not "well formed"

Fixes GH-5920

4 years agoAdd a few missing types to stubs
Máté Kocsis [Sat, 1 Aug 2020 21:54:28 +0000 (23:54 +0200)]
Add a few missing types to stubs

4 years agoBump timeout again
Nikita Popov [Sat, 1 Aug 2020 21:50:56 +0000 (23:50 +0200)]
Bump timeout again

4 years agoConvert resources to objects in ext/openssl
Máté Kocsis [Sat, 1 Aug 2020 20:42:26 +0000 (22:42 +0200)]
Convert resources to objects in ext/openssl

Closes GH-5860

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
4 years agoAllow overriding completion in `auto_prepend_file`
Tyson Andre [Sat, 18 Jul 2020 21:54:59 +0000 (17:54 -0400)]
Allow overriding completion in `auto_prepend_file`

Currently, it's possible to override `php -a`s completion
functionality to provide an alternative to the C implementation,
with `readline_completion_function()`.

However, that surprisingly gets overridden when called from
`auto_prepend_file`, because those scripts get run before the interactive shell
is started. I believe that not overriding it would be more consistent
with what happens when you override the completion function **after** the
interactive shell.

CLI is the only built-in API that uses this (See discussion in GH-5872).
I believe MINIT and RINIT will only run once when invoked with `php -a`.

Add documentation about the architecture of how php uses readline/libedit

Closes GH-5872

4 years agoGet rid of empty function entries
Máté Kocsis [Sat, 1 Aug 2020 07:42:04 +0000 (09:42 +0200)]
Get rid of empty function entries

Closes GH-5917

4 years agoImplement named parameters
Nikita Popov [Mon, 6 Apr 2020 10:46:52 +0000 (12:46 +0200)]
Implement named parameters

From an engine perspective, named parameters mainly add three
concepts:

 * The SEND_* opcodes now accept a CONST op2, which is the
   argument name. For now, it is looked up by linear scan and
   runtime cached.
 * This may leave UNDEF arguments on the stack. To avoid having
   to deal with them in other places, a CHECK_UNDEF_ARGS opcode
   is used to either replace them with defaults, or error.
 * For variadic functions, EX(extra_named_params) are collected
   and need to be freed based on ZEND_CALL_HAS_EXTRA_NAMED_PARAMS.

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

Closes GH-5357.

4 years agoThrow ValueError on empty tag in enchant_broker_request_dict()
George Peter Banyard [Fri, 31 Jul 2020 13:34:39 +0000 (14:34 +0100)]
Throw ValueError on empty tag in enchant_broker_request_dict()

4 years agoChange leftover RETURN_FALSE to RETURN_THROWS() from 4095c0a
George Peter Banyard [Fri, 31 Jul 2020 13:11:10 +0000 (14:11 +0100)]
Change leftover RETURN_FALSE to RETURN_THROWS() from 4095c0a

4 years agoPromote empty filename to ValueError in BZ2 extension
George Peter Banyard [Fri, 31 Jul 2020 13:01:05 +0000 (14:01 +0100)]
Promote empty filename to ValueError in BZ2 extension

4 years agoValueError for empty path in stream code
George Peter Banyard [Tue, 28 Jul 2020 13:50:41 +0000 (14:50 +0100)]
ValueError for empty path in stream code

Closes GH-5902

4 years agoWarning to ValueError promotion in Intl extension Part 1
George Peter Banyard [Fri, 31 Jul 2020 12:27:22 +0000 (13:27 +0100)]
Warning to ValueError promotion in Intl extension Part 1

Affects:
- IntlCalendar
- IntlGregorianCalendar
- IntlBreakIterator

Closes GH-5669

4 years agoUpdate i386 job to Ubuntu 20.04
Nikita Popov [Thu, 30 Jul 2020 08:38:11 +0000 (10:38 +0200)]
Update i386 job to Ubuntu 20.04

4 years agoAlso run function jit tests on macos
Nikita Popov [Thu, 30 Jul 2020 08:34:41 +0000 (10:34 +0200)]
Also run function jit tests on macos

4 years agoMake check in RECV_VARIADIC more precise
Nikita Popov [Fri, 31 Jul 2020 10:00:56 +0000 (12:00 +0200)]
Make check in RECV_VARIADIC more precise

Fetch arg_info only once (it's always the same one...) and check
ZEND_TYPE_IS_SET on it, rather than checking if *any* parameter
has a type.

4 years agoFixed JIT when result of ASSIGN is in register, but the original variable might need...
Dmitry Stogov [Fri, 31 Jul 2020 09:31:46 +0000 (12:31 +0300)]
Fixed JIT when result of ASSIGN is in register, but the original variable might need to be destroyed

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Fri, 31 Jul 2020 08:59:17 +0000 (10:59 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix #79919: Stack use-after-scope in define()

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Fri, 31 Jul 2020 08:56:29 +0000 (10:56 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79919: Stack use-after-scope in define()

4 years agoFix #79919: Stack use-after-scope in define()
Christoph M. Becker [Fri, 31 Jul 2020 07:12:22 +0000 (09:12 +0200)]
Fix #79919: Stack use-after-scope in define()

Instead of the temporary `rv`, we use the `val_free` which is there for
this purpose.

4 years agoDocument the signature change of zend_get_closure_method_def()
Máté Kocsis [Fri, 31 Jul 2020 08:04:49 +0000 (10:04 +0200)]
Document the signature change of zend_get_closure_method_def()

4 years agoFix the default value handling of imagegif()
Máté Kocsis [Fri, 31 Jul 2020 08:01:08 +0000 (10:01 +0200)]
Fix the default value handling of imagegif()

4 years agoRemove more unused func_info fields
Nikita Popov [Thu, 30 Jul 2020 16:08:11 +0000 (18:08 +0200)]
Remove more unused func_info fields

4 years agoWe check result type guard in FETCH_DIM_R/IS only if index is long or string.
Dmitry Stogov [Thu, 30 Jul 2020 16:19:10 +0000 (19:19 +0300)]
We check result type guard in FETCH_DIM_R/IS only if index is long or string.

4 years agoAdd type inference support for RECV_VARIADIC
Nikita Popov [Thu, 30 Jul 2020 15:14:34 +0000 (17:14 +0200)]
Add type inference support for RECV_VARIADIC

4 years agoRemove unused recv_arg_info from func_info
Nikita Popov [Thu, 30 Jul 2020 15:04:56 +0000 (17:04 +0200)]
Remove unused recv_arg_info from func_info

4 years agoRemove some dead code in RECV type inference
Nikita Popov [Thu, 30 Jul 2020 14:53:11 +0000 (16:53 +0200)]
Remove some dead code in RECV type inference

We must always have arg_info corresponding to RECV.

4 years agoClear result type for exit point caused by JMPZ_EX/NZ_EX
Dmitry Stogov [Thu, 30 Jul 2020 14:01:08 +0000 (17:01 +0300)]
Clear result type for exit point caused by JMPZ_EX/NZ_EX

4 years agoFixed memory leaks caused by incorrect AVOID_REFCOUNTING flag
Dmitry Stogov [Thu, 30 Jul 2020 13:59:41 +0000 (16:59 +0300)]
Fixed memory leaks caused by incorrect AVOID_REFCOUNTING flag

4 years agoAdd missing RETURN_THROWS()
Máté Kocsis [Thu, 30 Jul 2020 12:55:13 +0000 (14:55 +0200)]
Add missing RETURN_THROWS()

4 years agoAdd a few missing parameter types in stubs
Máté Kocsis [Tue, 28 Jul 2020 21:00:44 +0000 (23:00 +0200)]
Add a few missing parameter types in stubs

Related to GH-5627

4 years agoSkip tests leaking because of preloading failure.
Dmitry Stogov [Thu, 30 Jul 2020 11:04:14 +0000 (14:04 +0300)]
Skip tests leaking because of preloading failure.

4 years agoFixed bug #79897: Promoted constructor params with attribs cause crash
Deus Kane [Sat, 25 Jul 2020 11:02:01 +0000 (12:02 +0100)]
Fixed bug #79897: Promoted constructor params with attribs cause crash

This was caused by the attribute AST being used twice, and was fixed by
creating a temporary copy of it (and destroying said copy) when neccesary.

4 years agoCheck non-zero in is_power_of_two()
Nikita Popov [Thu, 30 Jul 2020 08:17:37 +0000 (10:17 +0200)]
Check non-zero in is_power_of_two()

And assert non-zero in floor_log2().

Fixes DASM_S_RANGE_I in ext/simplexml/tests/021.phpt.