]> granicus.if.org Git - php/log
php
4 years agoProperly handle NULL output start filename
Nikita Popov [Fri, 16 Oct 2020 16:38:03 +0000 (18:38 +0200)]
Properly handle NULL output start filename

4 years agoMake sure output start filename is not freed early
Nikita Popov [Fri, 16 Oct 2020 15:23:10 +0000 (17:23 +0200)]
Make sure output start filename is not freed early

As filenames are no longer interned, we need to keep a reference
to the zend_string to make sure it isn't freed.

To avoid a nominal source compatibility break, create a new member
in the globals.

4 years agoFix leak when setting dynamic property on generator
Nikita Popov [Fri, 16 Oct 2020 14:57:50 +0000 (16:57 +0200)]
Fix leak when setting dynamic property on generator

4 years ago[ci skip] Make it clear what GD uses instead of resources
Anatoly Pashin [Fri, 16 Oct 2020 09:06:11 +0000 (19:06 +1000)]
[ci skip] Make it clear what GD uses instead of resources

Closes GH-6342.

4 years agoVerify parameter names of function aliases
Máté Kocsis [Tue, 13 Oct 2020 18:03:00 +0000 (20:03 +0200)]
Verify parameter names of function aliases

Closes GH-6335

4 years agoDragonFlyBSD build update for opcache JIT part.
David Carlier [Wed, 14 Oct 2020 18:49:30 +0000 (19:49 +0100)]
DragonFlyBSD build update for opcache JIT part.

Closes GH-6339.

4 years agoAvoid refcounting when return CV (similar to optimization in VM).
Dmitry Stogov [Thu, 15 Oct 2020 12:27:00 +0000 (15:27 +0300)]
Avoid refcounting when return CV (similar to optimization in VM).

4 years agoFix bug #80055
Nikita Popov [Thu, 15 Oct 2020 10:46:07 +0000 (12:46 +0200)]
Fix bug #80055

We need to perform trait scope fixup for both methods involved
in the inheritance check. For that purpose we already need to
thread through a separate fn scope through the entire inheritance
checking machinery.

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Thu, 15 Oct 2020 11:20:58 +0000 (13:20 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix broken fix for #80239

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Thu, 15 Oct 2020 11:19:30 +0000 (13:19 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix broken fix for #80239

4 years agoFix broken fix for #80239
Christoph M. Becker [Thu, 15 Oct 2020 11:18:34 +0000 (13:18 +0200)]
Fix broken fix for #80239

No idea why that `git am` failed that badly.

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Thu, 15 Oct 2020 10:57:13 +0000 (12:57 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #80239: imap_rfc822_write_address() leaks memory

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Thu, 15 Oct 2020 10:55:44 +0000 (12:55 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #80239: imap_rfc822_write_address() leaks memory

4 years agoFix #80239: imap_rfc822_write_address() leaks memory
Christoph M. Becker [Thu, 15 Oct 2020 10:51:10 +0000 (12:51 +0200)]
Fix #80239: imap_rfc822_write_address() leaks memory

We have to free the address when we're finished with it.

4 years agoChange $controls parameter to default to null in ext/ldap
Côme Chilliet [Thu, 15 Oct 2020 09:46:44 +0000 (11:46 +0200)]
Change $controls parameter to default to null in ext/ldap

It appeared that not passing $controls and passing [] caused different
 behaviors, when not passing it the controls set through ldap_set_option
 would be used, when passing [] they would not.

So, this parameter is now nullable and defaults to null to have a
 consistent behavior.

4 years agoSkip arginfo test under msan
Nikita Popov [Thu, 15 Oct 2020 08:40:23 +0000 (10:40 +0200)]
Skip arginfo test under msan

Msan is missing interceptors for some functions that result in
false positives.

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Thu, 15 Oct 2020 08:17:55 +0000 (10:17 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix leak in gmp_export()

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Thu, 15 Oct 2020 08:16:56 +0000 (10:16 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix leak in gmp_export()

4 years agoFix leak in gmp_export()
Nikita Popov [Thu, 15 Oct 2020 08:16:22 +0000 (10:16 +0200)]
Fix leak in gmp_export()

4 years agoAdapt test expectation to cURL 7.73.0
Christoph M. Becker [Wed, 14 Oct 2020 16:50:56 +0000 (18:50 +0200)]
Adapt test expectation to cURL 7.73.0

cURL 7.73.0 introduced support for the MQTT protocol, so we have to
adapt our expectations regarding the supported protocols.

4 years agoSync zpp in phar interceptors
Nikita Popov [Wed, 14 Oct 2020 14:57:38 +0000 (16:57 +0200)]
Sync zpp in phar interceptors

This should match the zpp of the intercepted functions...

4 years agoFix null foreground in imagewbmp
Nikita Popov [Wed, 14 Oct 2020 14:40:09 +0000 (16:40 +0200)]
Fix null foreground in imagewbmp

The variable was not actually passed to zpp...

4 years agoMark ldap_exop() param as UNKNOWN
Nikita Popov [Wed, 14 Oct 2020 09:43:22 +0000 (11:43 +0200)]
Mark ldap_exop() param as UNKNOWN

This function actually has very different behavior depending on
whether $response_data is passed or not.

4 years agoMore arginfo/zpp verification
Nikita Popov [Tue, 21 Jul 2020 14:21:14 +0000 (16:21 +0200)]
More arginfo/zpp verification

Run all functions with a varying number of null arguments, which
helps us flush out all kinds of bugs.

Closes GH-5881.

4 years agoInitialize calendar_long variable
Nikita Popov [Wed, 14 Oct 2020 09:57:05 +0000 (11:57 +0200)]
Initialize calendar_long variable

As reported by cmb, this results a VC runtime warning. I don't
believe there's a problem here, as we only use calendar_long if
both calendar_is_null and calendar_obj are not set, but it doesn't
hurt to initialize it either...

4 years agoFix nullability of openssl_cms_sign() parameter
Nikita Popov [Wed, 14 Oct 2020 09:31:58 +0000 (11:31 +0200)]
Fix nullability of openssl_cms_sign() parameter

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Wed, 14 Oct 2020 08:56:51 +0000 (10:56 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Allow passing $tag for non-authenticated encryption

4 years agoAllow passing $tag for non-authenticated encryption
Nikita Popov [Tue, 13 Oct 2020 14:46:32 +0000 (16:46 +0200)]
Allow passing $tag for non-authenticated encryption

openssl_encrypt() currently throws a warning if the $tag out
parameter is passed for a non-authenticated cipher. This violates
the principle that a function should behave the same if a parameter
is not passed, and if the default value is passed for the parameter.

I believe this warning should simply be dropped and the $tag be
populated with null, as is already the case. Otherwise, it is not
possible to use openssl_encrypt() in generic wrapper APIs, that are
compatible with both authenticated and non-authenticated encryption.

Closes GH-6333.

4 years agoAdded missing side exit
Dmitry Stogov [Tue, 13 Oct 2020 22:17:39 +0000 (01:17 +0300)]
Added missing side exit

4 years agoUpdate NEWS for 8.0.0RC3
Sara Golemon [Tue, 13 Oct 2020 21:59:53 +0000 (21:59 +0000)]
Update NEWS for 8.0.0RC3

4 years agoUpdate NEWS for PHP 8.0.0RC2
Sara Golemon [Tue, 13 Oct 2020 21:53:31 +0000 (21:53 +0000)]
Update NEWS for PHP 8.0.0RC2

4 years agoNormalize mb_ereg() return value
Nikita Popov [Tue, 13 Oct 2020 14:17:40 +0000 (16:17 +0200)]
Normalize mb_ereg() return value

mb_ereg()/mb_eregi() currently have an inconsistent return value
based on whether the $matches parameter is passed or not:

> Returns the byte length of the matched string if a match for
> pattern was found in string, or FALSE if no matches were found
> or an error occurred.
>
> If the optional parameter regs was not passed or the length of
> the matched string is 0, this function returns 1.

Coupling this behavior to the $matches parameter doesn't make sense
-- we know the match length either way, there is no technical
reason to distinguish them. However, returning the match length
is not particularly useful either, especially due to the need to
convert 0-length into 1-length to satisfy "truthy" checks. We
could always return 1, which would kind of match the behavior of
preg_match() -- however, preg_match() actually returns the number
of matches, which is 0 or 1 for preg_match(), while false signals
an error. However, mb_ereg() returns false both for no match and
for an error. This would result in an odd 1|false return value.

The patch canonicalizes mb_ereg() to always return a boolean,
where true indicates a match and false indicates no match or error.
This also matches the behavior of the mb_ereg_match() and
mb_ereg_search() functions.

This fixes the default value integrity violation in PHP 8.

Closes GH-6331.

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Tue, 13 Oct 2020 17:40:49 +0000 (19:40 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #64076: imap_sort() does not return FALSE on failure

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 13 Oct 2020 17:38:10 +0000 (19:38 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #64076: imap_sort() does not return FALSE on failure

4 years agoFix #64076: imap_sort() does not return FALSE on failure
Christoph M. Becker [Tue, 13 Oct 2020 14:20:55 +0000 (16:20 +0200)]
Fix #64076: imap_sort() does not return FALSE on failure

If unsupported `$search_criteria` are passed to `imap_sort()`, the
function returns an empty array, but there is also an error on the
libc-client error stack ("Unknown search criterion: UNSUPPORTED
(errflg=2)").  If, on the other hand, unsupported `$criteria` or
unsupported `$flags` are passed, the function returns `false`.  We
solve this inconsistency by returning `false` for unsupported
`$search_criteria` as well.

Closes GH-6332.

4 years agoFix incorrect zpp parameter count in mb_substr() / mb_strcut()
Nikita Popov [Tue, 13 Oct 2020 15:44:56 +0000 (17:44 +0200)]
Fix incorrect zpp parameter count in mb_substr() / mb_strcut()

These functions only accept 4 params.

4 years agoFix default value for some pgsql functions
Nikita Popov [Tue, 13 Oct 2020 15:28:38 +0000 (17:28 +0200)]
Fix default value for some pgsql functions

These set the PGSQL_DML_EXEC flag by default.

4 years agoFix null handling in mysqli_begin_transaction()
Nikita Popov [Tue, 13 Oct 2020 15:10:41 +0000 (17:10 +0200)]
Fix null handling in mysqli_begin_transaction()

We don't want an explicit null name hit the !name_len check.

4 years agoFix argument nullability in mbstring
Nikita Popov [Tue, 13 Oct 2020 14:02:29 +0000 (16:02 +0200)]
Fix argument nullability in mbstring

These arguments were declared nullable in stubs (and should be
nullable), but didn't accept null in zpp.

4 years agoDon't accept null in pg_unescape_bytea()
Nikita Popov [Tue, 13 Oct 2020 13:36:09 +0000 (15:36 +0200)]
Don't accept null in pg_unescape_bytea()

This is an error that slipped in via 8d37c37bcdbf6fa99cd275413342457eeb2c664e.
pg_unescape_bytea() did not accept null in PHP 7.4, and it is not
meaningful for it to accept null now -- it will always fail, and now
with a misleading OOM message.

4 years agoUpdate ext/odbc parameter names
Christoph M. Becker [Tue, 13 Oct 2020 12:57:17 +0000 (14:57 +0200)]
Update ext/odbc parameter names

Closes GH-6303.

4 years agoUse $statement in mysqli
Nikita Popov [Tue, 13 Oct 2020 10:38:39 +0000 (12:38 +0200)]
Use $statement in mysqli

As we went with $statement rather than $stmts in other places,
let's also use it in mysqli. The discrepancy with mysqli_stmt
is a bit unfortunate, but we can't be consistent with *both*.

Closes GH-6330.

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Derick Rethans [Tue, 13 Oct 2020 11:29:14 +0000 (12:29 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

4 years agoPrepare for 7.4.13
Derick Rethans [Tue, 13 Oct 2020 11:28:58 +0000 (12:28 +0100)]
Prepare for 7.4.13

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Tue, 13 Oct 2020 11:12:39 +0000 (13:12 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Ignore memory leaks reported for some libc-client functions

4 years agoIgnore memory leaks reported for some libc-client functions
Christoph M. Becker [Mon, 12 Oct 2020 15:28:24 +0000 (17:28 +0200)]
Ignore memory leaks reported for some libc-client functions

At least on Windows, some static variables are lazily initialized
during `mail_open()` and `mail_lsub()`, which are reported as memory
leaks.  We suppress these false positives.

Closes GH-6326.

4 years agoGive preference to live-ranges with register hints to improve register reuse.
Dmitry Stogov [Tue, 13 Oct 2020 10:59:53 +0000 (13:59 +0300)]
Give preference to live-ranges with register hints to improve register reuse.

4 years agoUpdate ext/pdo_pgsql parameter names
Nikita Popov [Tue, 13 Oct 2020 09:11:13 +0000 (11:11 +0200)]
Update ext/pdo_pgsql parameter names

Closes GH-6329.

4 years agoUpdate ext/pgsql parameter names
Nikita Popov [Wed, 7 Oct 2020 14:07:03 +0000 (16:07 +0200)]
Update ext/pgsql parameter names

Closes GH-6294.

4 years agoFix handling of throwing undef var in verify return
Nikita Popov [Tue, 13 Oct 2020 09:38:30 +0000 (11:38 +0200)]
Fix handling of throwing undef var in verify return

If we have an undefined variable and null is not accepted by the
return type, we want to throw just the undef var error.

In this case this lead to an infinite loop, because we overwrite
the exception opline in SAVE_OPLINE and it does not get reset
when chaining into a previous exception. Add an assertiong to
catch this case earlier.

4 years agoUpdate ext/sodium parameter names
Nikita Popov [Tue, 6 Oct 2020 10:02:11 +0000 (12:02 +0200)]
Update ext/sodium parameter names

Closes GH-6279.

4 years agoAvoid useless register allocation
Dmitry Stogov [Tue, 13 Oct 2020 08:37:33 +0000 (11:37 +0300)]
Avoid useless register allocation

4 years agoUpdate ext/phar parameter names
Nikita Popov [Wed, 7 Oct 2020 15:33:22 +0000 (17:33 +0200)]
Update ext/phar parameter names

Closes GH-6307.

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Tue, 13 Oct 2020 07:55:33 +0000 (09:55 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  7.3.25 is next

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 13 Oct 2020 07:53:52 +0000 (09:53 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  7.3.25 is next

4 years ago7.3.25 is next
Christoph M. Becker [Tue, 13 Oct 2020 07:52:46 +0000 (09:52 +0200)]
7.3.25 is next

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Mon, 12 Oct 2020 21:21:35 +0000 (23:21 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #80226: imap_sort() leaks sortpgm memory

4 years agoPerform trace range propagation
Dmitry Stogov [Mon, 12 Oct 2020 21:18:17 +0000 (00:18 +0300)]
Perform trace range propagation

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 12 Oct 2020 21:17:42 +0000 (23:17 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #80226: imap_sort() leaks sortpgm memory

4 years agoFix #80226: imap_sort() leaks sortpgm memory
Christoph M. Becker [Mon, 12 Oct 2020 16:06:53 +0000 (18:06 +0200)]
Fix #80226: imap_sort() leaks sortpgm memory

We need to free what we have allocated.

Closes GH-6327.

4 years agoChange parameters types from int to bool
Christoph M. Becker [Mon, 12 Oct 2020 17:18:03 +0000 (19:18 +0200)]
Change parameters types from int to bool

These are typical boolean parameters, so we shouldn't advertize them as
integers.  For the `$reverse` parameter that even fixes expectations,
because the `reverse` member is a bitfield of 1 bit, so assigning any
even integer would not set it.

Closes GH-6328.

4 years agoEliminate dead stores
Dmitry Stogov [Mon, 12 Oct 2020 19:59:30 +0000 (22:59 +0300)]
Eliminate dead stores

4 years agoImprove parameter names in ext/intl
Máté Kocsis [Fri, 9 Oct 2020 11:14:41 +0000 (13:14 +0200)]
Improve parameter names in ext/intl

Closes GH-6309

4 years agoImprove parameter names in ext/pdo_sqlite
Máté Kocsis [Fri, 9 Oct 2020 21:02:14 +0000 (23:02 +0200)]
Improve parameter names in ext/pdo_sqlite

Closes GH-6310

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Mon, 12 Oct 2020 14:44:18 +0000 (16:44 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  intl: report more information about message pattern parse errors

4 years agointl: report more information about message pattern parse errors
Philip Hofstetter [Fri, 9 Oct 2020 09:55:33 +0000 (11:55 +0200)]
intl: report more information about message pattern parse errors

The message patterns can be pretty complex, so reporting a generic
U_PARSE_ERROR without any additional information makes it needlessly
hard to fix erroneous patterns.

This commit makes use of the additional UParseError* parameter to
umsg_open to retrieve more details about the parse error to report that
to the user via intl_get_error_message()

Additional improve error reporting from the IntlMessage constructor.
Previously, all possible failures when calling IntlMessage::__construct()
would be masked away with a generic "Constructor failed" message.
This would include invalid patterns.

This commit makes sure that the underlying error that caused the
constructor failure is reported as part of the IntlException error
message.

Closes GH-6325.

4 years agoFixed bug #80225
Nikita Popov [Mon, 12 Oct 2020 14:34:19 +0000 (16:34 +0200)]
Fixed bug #80225

Namespaced and declares have a different interpretation of what
"first statement" means.

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Mon, 12 Oct 2020 14:30:34 +0000 (16:30 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #80216: imap_mail_compose() does not validate types/encodings

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 12 Oct 2020 14:28:36 +0000 (16:28 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #80216: imap_mail_compose() does not validate types/encodings

4 years agoFix #80216: imap_mail_compose() does not validate types/encodings
Christoph M. Becker [Mon, 12 Oct 2020 12:04:18 +0000 (14:04 +0200)]
Fix #80216: imap_mail_compose() does not validate types/encodings

We need to check whether the given `type`s and `encoding`s are within
bounds to avoid segfaults and out-of-bound reads.

Closes GH-6323.

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Mon, 12 Oct 2020 13:10:27 +0000 (15:10 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #80223: imap_mail_compose() leaks envelope on malformed bodies

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

* PHP-7.3:
  Fix #80223: imap_mail_compose() leaks envelope on malformed bodies

4 years agoFix #80223: imap_mail_compose() leaks envelope on malformed bodies
Christoph M. Becker [Mon, 12 Oct 2020 11:26:38 +0000 (13:26 +0200)]
Fix #80223: imap_mail_compose() leaks envelope on malformed bodies

We have to clean up even on failure.

Closes GH-6322.

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Mon, 12 Oct 2020 11:34:07 +0000 (13:34 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #80220: imap_mail_compose() may leak memory

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 12 Oct 2020 11:32:28 +0000 (13:32 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #80220: imap_mail_compose() may leak memory

4 years agoFix #80220: imap_mail_compose() may leak memory
Christoph M. Becker [Mon, 12 Oct 2020 08:36:18 +0000 (10:36 +0200)]
Fix #80220: imap_mail_compose() may leak memory

Unless `topbod` is of `TYPEMULTIPART`, `mail_free_body()` does not free
the `nested.part`; while we could do this ourselves, instead we just
ignore additional bodies in this case, i.e. we don't attach them in the
first place.

Closes GH-6321.

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Mon, 12 Oct 2020 10:56:21 +0000 (12:56 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Revert "Add missing X509 purpose constants"

4 years agoRevert "Add missing X509 purpose constants"
Nikita Popov [Mon, 12 Oct 2020 10:56:07 +0000 (12:56 +0200)]
Revert "Add missing X509 purpose constants"

This reverts commit 1e53e14bc31aec98a408e517c7c8493ef4bf80cd.

This fails on Travis.

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Mon, 12 Oct 2020 09:53:22 +0000 (11:53 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Add missing X509 purpose constants

4 years agoAdd missing X509 purpose constants
Vincent JARDIN [Fri, 9 Oct 2020 22:14:06 +0000 (22:14 +0000)]
Add missing X509 purpose constants

X509_PURPOSE_OCSP_HELPER, X509_PURPOSE_TIMESTAMP_SIGN are available
from OpenSSL for many years:

  - X509_PURPOSE_OCSP_HELPER, since 2001
  - X509_PURPOSE_TIMESTAMP_SIGN, since 2006

Also drop the ifdef check for X509_PURPOSE_ANY, as it is always
available in supported OpenSSL versions.

Closes GH-6312.

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Mon, 12 Oct 2020 09:25:27 +0000 (11:25 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Detect self-addition of array more accurately
  Deindirect source elements in zend_hash_merge

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Mon, 12 Oct 2020 09:24:59 +0000 (11:24 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Detect self-addition of array more accurately
  Deindirect source elements in zend_hash_merge

4 years agoDetect self-addition of array more accurately
Nikita Popov [Mon, 12 Oct 2020 09:22:39 +0000 (11:22 +0200)]
Detect self-addition of array more accurately

While the zvals may be different, they may still point to the
same array.

Fixes oss-fuzz #26245.

4 years agoDeindirect source elements in zend_hash_merge
Nikita Popov [Mon, 12 Oct 2020 09:03:39 +0000 (11:03 +0200)]
Deindirect source elements in zend_hash_merge

If the RHS has INDIRECT elements, we do not those to be added to
the LHS verbatim. As we're using UPDATE_INDIRECT, we might even
create a nested INDIRECT that way.

This is a side-quest of oss-fuzz #26245.

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Mon, 12 Oct 2020 08:06:30 +0000 (10:06 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Backport schedule in yaml

4 years agoBackport schedule in yaml
Nikita Popov [Mon, 12 Oct 2020 08:05:37 +0000 (10:05 +0200)]
Backport schedule in yaml

I'm not sure it's needed, but let's try it: Add the scheduled
builds on PHP-7.4 and PHP-8.0 as well, rather than just master.

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Mon, 12 Oct 2020 07:46:38 +0000 (09:46 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Avoid non-object in FE_FREE

4 years agoAvoid non-object in FE_FREE
Nikita Popov [Mon, 12 Oct 2020 07:38:59 +0000 (09:38 +0200)]
Avoid non-object in FE_FREE

Even if the properties HT is empty, make sure we still leave an
object in the FE_RESET result, so our type inference results
stay correct.

4 years agoXMLReader::open() and XMLReader::xml() are now static
Christoph M. Becker [Sun, 11 Oct 2020 16:50:35 +0000 (18:50 +0200)]
XMLReader::open() and XMLReader::xml() are now static

4 years agoRemove return types from XMLWriter stubs
Christoph M. Becker [Sun, 11 Oct 2020 14:36:19 +0000 (16:36 +0200)]
Remove return types from XMLWriter stubs

These break BC, and as such we have to stick with docblock annotations.

Closes GH-6319.

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Derick Rethans [Sun, 11 Oct 2020 13:54:12 +0000 (14:54 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Derick Rethans [Sun, 11 Oct 2020 13:54:02 +0000 (14:54 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

4 years agoFixed test for bug #48097 due to confirmed data changes in timelib
Derick Rethans [Sun, 11 Oct 2020 13:53:52 +0000 (14:53 +0100)]
Fixed test for bug #48097 due to confirmed data changes in timelib

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Sat, 10 Oct 2020 21:28:04 +0000 (23:28 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #80215: imap_mail_compose() may modify by-val parameters

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Sat, 10 Oct 2020 21:25:43 +0000 (23:25 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #80215: imap_mail_compose() may modify by-val parameters

4 years agoFix #80215: imap_mail_compose() may modify by-val parameters
Christoph M. Becker [Sat, 10 Oct 2020 15:16:41 +0000 (17:16 +0200)]
Fix #80215: imap_mail_compose() may modify by-val parameters

We separate the input arrays and all sub-arrays to avoid modification
of the passed parameters.

This should be rewritten to use `zend_string`s for the "master" branch.

Closes GH-6316.

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Sat, 10 Oct 2020 17:19:33 +0000 (19:19 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #80213: imap_mail_compose() segfaults on certain $bodies

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Sat, 10 Oct 2020 17:17:59 +0000 (19:17 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #80213: imap_mail_compose() segfaults on certain $bodies

4 years agoFix #80213: imap_mail_compose() segfaults on certain $bodies
Christoph M. Becker [Sat, 10 Oct 2020 12:09:07 +0000 (14:09 +0200)]
Fix #80213: imap_mail_compose() segfaults on certain $bodies

We have to cater to non-associative arrays where the key may be `NULL`;
we just skip these elements.

Closes GH-6315.

4 years agoFix #80175: PHP8 RC1 - JIT Buffer not working
Christoph M. Becker [Sat, 3 Oct 2020 15:02:24 +0000 (17:02 +0200)]
Fix #80175: PHP8 RC1 - JIT Buffer not working

On Windows, `SUCCESSFULLY_REATTACHED` does not imply that the process
has already been properly initialized; thus we must not skip some setup
steps in `zend_jit_startup()`.

Closes GH-6268.