]> granicus.if.org Git - php/log
php
4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Derick Rethans [Mon, 31 Aug 2020 11:31:44 +0000 (12:31 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

4 years agoFixed test case
Derick Rethans [Mon, 31 Aug 2020 11:31:23 +0000 (12:31 +0100)]
Fixed test case

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Derick Rethans [Mon, 31 Aug 2020 10:41:57 +0000 (11:41 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

4 years agoUpdate timelib to 2018.04
Derick Rethans [Mon, 31 Aug 2020 10:41:41 +0000 (11:41 +0100)]
Update timelib to 2018.04

4 years agoFix bug #80037
Nikita Popov [Mon, 31 Aug 2020 10:17:00 +0000 (12:17 +0200)]
Fix bug #80037

If we're accessing an uninitialized typed property and __get is
defined, don't perform a read_property callback, as __get is
supposed to have no effect on uninitialized typed properties.
Usually it doesn't, but by-reference assignments cannot be
performed through read_property.

I'm deleting the test for bug #80039 again, as it doesn't really
make sense anymore with this fix.

4 years agoAdd test for bug #80039
Nikita Popov [Mon, 31 Aug 2020 09:22:16 +0000 (11:22 +0200)]
Add test for bug #80039

This has already been fixed by 247105ae1ae2a04608078f7fcfe88dacab9f55a4,
but let's add the additional test case.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Matteo Beccati [Mon, 31 Aug 2020 09:08:26 +0000 (11:08 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #80027 Terrible performance using $query->fetch on queries with many bind parameters

4 years agoFix #80027 Terrible performance using $query->fetch on queries with many bind parameters
Matteo Beccati [Mon, 31 Aug 2020 08:45:36 +0000 (10:45 +0200)]
Fix #80027 Terrible performance using $query->fetch on queries with many bind parameters

Added new flags that allow skipping param_evt(s) that are not used by drivers,
in a backwards and forward compatible manner. Updated the pgsql, mysql, sqlite
and oci drivers to properly use the new flags. I've left out pdo_dblib, which
doesn't have a param_hook, and pdo_firebird, which seems to be using
PARAM_EVT_NORMALIZE in a wrong context (param type vs event type).

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Mon, 31 Aug 2020 08:51:49 +0000 (10:51 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix handling of exception if valid() during yield from

4 years agoFix handling of exception if valid() during yield from
Nikita Popov [Mon, 31 Aug 2020 08:51:00 +0000 (10:51 +0200)]
Fix handling of exception if valid() during yield from

Fixes oss-fuzz #25296.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Mon, 31 Aug 2020 07:32:40 +0000 (09:32 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Make MAX_IFD_NESTING_LEVEL an actual nesting level

4 years agoMake MAX_IFD_NESTING_LEVEL an actual nesting level
Nikita Popov [Wed, 12 Aug 2020 08:09:37 +0000 (10:09 +0200)]
Make MAX_IFD_NESTING_LEVEL an actual nesting level

Currently we only ever increment ifd_nesting_level, so this ends up
being a limit on the total number of IFD tags and we regularly get
bug reports of it being exceeded. I think the intention behind this
limit was to prevent recursion stack overflow, and for that we only
need to check actual recursive usage. I've implemented that here,
and dropped the nesting limit down to a smaller value
(which still passes our tests).

However, it seems that we do also need to have a total limit on
the number of tags, as we don't catch some instances of infinite
looping otherwise. Add this as a separate limit with a higher
value, that should hopefully be sufficient.

This is expected to fix a number of bugs:

https://bugs.php.net/bug.php?id=78083
https://bugs.php.net/bug.php?id=78701
https://bugs.php.net/bug.php?id=79907
https://bugs.php.net/bug.php?id=80016

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
twosee [Sun, 30 Aug 2020 08:25:12 +0000 (16:25 +0800)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Improve error_handing replacement functions

4 years agoImprove error_handing replacement functions
twosee [Thu, 27 Aug 2020 16:54:46 +0000 (00:54 +0800)]
Improve error_handing replacement functions

We explicitly skip calls to user_error_handler in EH_THROW mode

Closes GH-6050.

4 years agoDon't assert when comparing uninit DateTimeZone objects
Nikita Popov [Thu, 27 Aug 2020 14:18:45 +0000 (16:18 +0200)]
Don't assert when comparing uninit DateTimeZone objects

Nothing guarantees that the objects are initialized here... just
check as usual.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Thu, 27 Aug 2020 13:51:35 +0000 (15:51 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Require non-negative length in stream_get_contents()

4 years agoRequire non-negative length in stream_get_contents()
Nikita Popov [Thu, 27 Aug 2020 13:49:33 +0000 (15:49 +0200)]
Require non-negative length in stream_get_contents()

If the length is not -1, require it to be non-negative.

Using such lengths doesn't make sense (as only -1 is special-case
to read in chunks, anything else will end up doing a huge upfront
allocation) and can lead to string allocation overflow.

A similar check is already in place for file_get_contents(). That
one does not allow -1 (and uses null instead), but this function
is explicitly specified to accept -1, so stick to that behavior.

4 years agoCatch potential exceptions during to string conversion
Christoph M. Becker [Tue, 25 Aug 2020 13:40:17 +0000 (15:40 +0200)]
Catch potential exceptions during to string conversion

As of PHP 7.4.0, exceptions are allowed to be thrown from inside
`__toString()` methods; we have to cater to that, and catch these
exceptions early.

Closes GH-6042

4 years agoProperty handle read_property exception in fetch_property_address
Nikita Popov [Wed, 26 Aug 2020 14:10:29 +0000 (16:10 +0200)]
Property handle read_property exception in fetch_property_address

Otherwise we leak (and corrupt uninitialized_zval).

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Wed, 26 Aug 2020 13:40:57 +0000 (15:40 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix com_safearray_proxy related memory management issues

4 years agoFix com_safearray_proxy related memory management issues
Christoph M. Becker [Wed, 26 Aug 2020 13:31:26 +0000 (15:31 +0200)]
Fix com_safearray_proxy related memory management issues

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Wed, 26 Aug 2020 13:01:22 +0000 (15:01 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Separate COM::__construct()s $server_name array

4 years agoSeparate COM::__construct()s $server_name array
Christoph M. Becker [Tue, 25 Aug 2020 11:48:50 +0000 (13:48 +0200)]
Separate COM::__construct()s $server_name array

This may otherwise be modified.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Wed, 26 Aug 2020 12:52:09 +0000 (14:52 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #64130: COM obj parameters passed by reference are not updated

4 years agoFix #64130: COM obj parameters passed by reference are not updated
Christoph M. Becker [Wed, 26 Aug 2020 12:45:13 +0000 (14:45 +0200)]
Fix #64130: COM obj parameters passed by reference are not updated

`ITypeInfo_GetIDsOfNames()` is supposed to fail with `E_NOTIMPL` for
out-of-process servers, thus we should not remove the already available
typeinfo of the object in this case.

We also properly free the `byref_vals`.

4 years agoFix file name clash in test
Nikita Popov [Wed, 26 Aug 2020 10:32:06 +0000 (12:32 +0200)]
Fix file name clash in test

4 years agoAvoid socket path clash in test
Nikita Popov [Wed, 26 Aug 2020 10:11:22 +0000 (12:11 +0200)]
Avoid socket path clash in test

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Wed, 26 Aug 2020 09:32:31 +0000 (11:32 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix memory leak when yielding from non-iterable

4 years agoFix memory leak when yielding from non-iterable
Nikita Popov [Wed, 26 Aug 2020 09:32:01 +0000 (11:32 +0200)]
Fix memory leak when yielding from non-iterable

4 years agoDon't enable --with-mm in CI
Nikita Popov [Tue, 25 Aug 2020 18:25:07 +0000 (20:25 +0200)]
Don't enable --with-mm in CI

Turns out this has a large negative effect on startup time,
making tests much slower.

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

* PHP-7.3:
  Avoid double-free

4 years agoAvoid double-free
Christoph M. Becker [Tue, 25 Aug 2020 11:07:29 +0000 (13:07 +0200)]
Avoid double-free

As of commit b2e3fd1[1] the `authid.User` is no longer newly allocated,
so we must not free it.

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

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Tue, 25 Aug 2020 10:35:54 +0000 (12:35 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Remove bogus REGISTER_LONG_CONSTANT

4 years agoRemove bogus REGISTER_LONG_CONSTANT
Nikita Popov [Tue, 25 Aug 2020 10:34:32 +0000 (12:34 +0200)]
Remove bogus REGISTER_LONG_CONSTANT

This shouldn't be in this function, probably a copy/paste mistake...

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 24 Aug 2020 15:36:50 +0000 (17:36 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix potential integer overflow detected by oss-fuzz

4 years agoFix potential integer overflow detected by oss-fuzz
Christoph M. Becker [Mon, 24 Aug 2020 15:32:06 +0000 (17:32 +0200)]
Fix potential integer overflow detected by oss-fuzz

We port the respective fix from upstream[1].

[1] <https://github.com/libgd/libgd/commit/9ed642764cf0b4585d135eb738812a43265cb2d3>

4 years agoFix refcounting
Nikita Popov [Mon, 24 Aug 2020 14:23:19 +0000 (16:23 +0200)]
Fix refcounting

4 years agoFix #79979: passing value to by-ref param via CUFA crashes
Christoph M. Becker [Mon, 24 Aug 2020 09:47:31 +0000 (11:47 +0200)]
Fix #79979: passing value to by-ref param via CUFA crashes

If a by-val send is not allowed, we must not do so.  Instead we wrap
the value in a temporary reference.

Closes GH-6000

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

* PHP-7.3:
  Fix #79986: str_ireplace bug with diacritics characters

4 years agoFix #79986: str_ireplace bug with diacritics characters
Christoph M. Becker [Tue, 18 Aug 2020 11:24:17 +0000 (13:24 +0200)]
Fix #79986: str_ireplace bug with diacritics characters

`tolower()` returns an `int`, so we must not convert to `char` which
may be `signed` and as such may be subject to overflow (actually,
implementation defined behavior).

Closes GH-6007

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

* PHP-7.3:
  Fix #80002: calc free space for new interned string is wrong

4 years agoFix #80002: calc free space for new interned string is wrong
Christoph M. Becker [Thu, 20 Aug 2020 09:20:03 +0000 (11:20 +0200)]
Fix #80002: calc free space for new interned string is wrong

We need to calculate the free size in bytes.

Patch contributed by t-matsuno.

Closes GH-6024

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

* PHP-7.3:
  Fix #80007: Potential type confusion in unixtojd() parameter parsing

4 years agoFix #80007: Potential type confusion in unixtojd() parameter parsing
Andy Postnikov [Fri, 21 Aug 2020 23:44:48 +0000 (02:44 +0300)]
Fix #80007: Potential type confusion in unixtojd() parameter parsing

Also it fixes test on 32-bit armv7 and x86
- Test unixtojd() function : error conditions [ext/calendar/tests/unixtojd_error1.phpt]

Closes GH-6033

4 years agosqlite3 linkage issue on some systems/package combination fix.
David Carlier [Sat, 15 Aug 2020 13:11:51 +0000 (14:11 +0100)]
sqlite3 linkage issue on some systems/package combination fix.

Checking the version is not enough, the function might be available
but the symbols are not present still.

Closes GH-5993

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Fri, 21 Aug 2020 13:28:37 +0000 (15:28 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix wrong datatype

4 years agoFix wrong datatype
Manuel Mausz [Fri, 21 Aug 2020 11:53:40 +0000 (11:53 +0000)]
Fix wrong datatype

ini_entry->modifiable is of type uint8_t and so should be the temp. variable. Especially important after 4b77a158.

Closes GH-6028

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Matteo Beccati [Tue, 18 Aug 2020 16:27:26 +0000 (18:27 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #47021: SoapClient stumbles over WSDL delivered with "Transfer-Encoding: chunked"

4 years agoFix #47021: SoapClient stumbles over WSDL delivered with "Transfer-Encoding: chunked"
Matteo Beccati [Tue, 18 Aug 2020 16:10:39 +0000 (18:10 +0200)]
Fix #47021: SoapClient stumbles over WSDL delivered with "Transfer-Encoding: chunked"

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

* PHP-7.3:
  7.3.23 is next

4 years ago7.3.23 is next
Christoph M. Becker [Tue, 18 Aug 2020 07:55:37 +0000 (09:55 +0200)]
7.3.23 is next

4 years agoPrepare for 7.4.11
Derick Rethans [Tue, 18 Aug 2020 07:06:20 +0000 (08:06 +0100)]
Prepare for 7.4.11

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 18 Aug 2020 06:35:56 +0000 (08:35 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix HTTP response status code

4 years agoFix HTTP response status code
Christoph M. Becker [Mon, 17 Aug 2020 16:36:02 +0000 (18:36 +0200)]
Fix HTTP response status code

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

* PHP-7.3:
  Null terminate the sodium_crypto_kx_keypair() result

4 years agoNull terminate the sodium_crypto_kx_keypair() result
Nikita Popov [Fri, 14 Aug 2020 13:51:00 +0000 (15:51 +0200)]
Null terminate the sodium_crypto_kx_keypair() result

4 years agoAdd missing initialization check to RegexIterator::getRegex()
Nikita Popov [Fri, 14 Aug 2020 08:27:09 +0000 (10:27 +0200)]
Add missing initialization check to RegexIterator::getRegex()

4 years agoFixed bug #79724
Nikita Popov [Thu, 13 Aug 2020 09:45:05 +0000 (11:45 +0200)]
Fixed bug #79724

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Tue, 11 Aug 2020 15:13:00 +0000 (17:13 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #64705 errorInfo property of PDOException is null when PDO::__construct() fails

4 years agoFix #64705 errorInfo property of PDOException is null when PDO::__construct() fails
Ahmed Abdou [Sun, 17 Feb 2019 21:59:00 +0000 (22:59 +0100)]
Fix #64705 errorInfo property of PDOException is null when PDO::__construct() fails

PDO driver constructors are throwing PdoException without setting
errorInfo, so create a new reusable function that throws exceptions
for PDO and will also set the errorInfo. Use this function in
pdo_mysql, pdo_sqlite, and pdo_pgsql.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Tue, 11 Aug 2020 14:26:55 +0000 (16:26 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix bug #75785 by attempt switching endianness on Maker's Note

4 years agoFix bug #75785 by attempt switching endianness on Maker's Note
Nawarian [Sun, 12 Jul 2020 19:53:52 +0000 (21:53 +0200)]
Fix bug #75785 by attempt switching endianness on Maker's Note

Different manufacturer models may come with a
different endianness (motorola/intel) format. In
order to avoid a big refactor and a gigantic lookup
table, this commit simply attempts to switch the
endianness and proceed when values are acceptable.

Closes GH-5849.

4 years agoFixed bug #79917
Nikita Popov [Tue, 11 Aug 2020 12:42:13 +0000 (14:42 +0200)]
Fixed bug #79917

op_arrays can be shared on two levels: Either the op_array is
completely shared, or it is distinct but shares all members
(apart from static_variables).

The the op_array is distinct, we need to make sure to properly
initialize the MAP_PTR structures.

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

* PHP-7.3:
  Fix #48585: com_load_typelib holds reference, fails on second call

4 years agoFix #48585: com_load_typelib holds reference, fails on second call
Christoph M. Becker [Tue, 4 Aug 2020 16:25:50 +0000 (18:25 +0200)]
Fix #48585: com_load_typelib holds reference, fails on second call

Whether the type library is cached is actually irrelevant here; what
matters is that the symbols are imported, and since these are not
cached, we have to import them for every request.  And we cannot cache
the symbols, because the import depends on the current codepage, but
the codepage is a `PHP_INI_ALL` setting.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Tue, 11 Aug 2020 08:35:17 +0000 (10:35 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed bug #79951

4 years agoFixed bug #79951
Nikita Popov [Tue, 11 Aug 2020 08:33:59 +0000 (10:33 +0200)]
Fixed bug #79951

One branch did not release tmp_replace_entry_str.

Also reduce the scope of some variables.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
George Wang [Mon, 10 Aug 2020 23:11:26 +0000 (19:11 -0400)]
Merge branch 'PHP-7.3' into PHP-7.4

4 years agoMake sure string is NUL byte terminated.
George Wang [Mon, 10 Aug 2020 23:11:03 +0000 (19:11 -0400)]
Make sure string is NUL byte terminated.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Mon, 10 Aug 2020 19:53:20 +0000 (21:53 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Check the correct list

4 years agoCheck the correct list
Nikita Popov [Mon, 10 Aug 2020 19:52:36 +0000 (21:52 +0200)]
Check the correct list

This was supposed to check mx_list, not weight_list... oops.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Mon, 10 Aug 2020 18:43:04 +0000 (20:43 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix bug #79944

4 years agoFix bug #79944
Nikita Popov [Mon, 10 Aug 2020 14:53:31 +0000 (16:53 +0200)]
Fix bug #79944

Only return true from dns_get_mx if we actually found any MX record.

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

* PHP-7.3:
  Fix #79922: Crash after multiple calls to xml_parser_free()

4 years agoFix #79922: Crash after multiple calls to xml_parser_free()
Christoph M. Becker [Mon, 10 Aug 2020 08:40:31 +0000 (10:40 +0200)]
Fix #79922: Crash after multiple calls to xml_parser_free()

We must not call `zend_list_delete()` in resource closer functions
exposed to userland, because decreasing the refcount there leads to
use-after-free scenarios.  In this case, commit 4a42fbb worked for
typical use-cases where `xml_parser_free()` has been called exactly
once for the resource, because there is an internal zval (`->index`)
referencing the same resource which already increased the refcount by
one.  However, when `xml_parser_free()` is called multiple times on the
same XML parser resource, the resource would be freed prematurely.

Instead we forcefully close the resource in `xml_parser_free()`.  We
also could decrease the refcount of the resource there, but that would
require to call `xml_parser_free()` which is somewhat uncommon, and
would be particularly bad wrt. PHP 8 where that function is a NOP, and
as such doesn't have to be called.  So we do no longer increase the
refcount of the resource when copying it to the internal zval, and let
the usualy refcounting semantics take care of the resource destruction.

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

4 years agoFixed bug #79947
Nikita Popov [Mon, 10 Aug 2020 08:08:31 +0000 (10:08 +0200)]
Fixed bug #79947

Move the FREE_OP for op_data out of the zend_binary_assign_op_dim_slow()
slow path, so it can be used by the other error path as well. This
makes ASSIGN_DIM_OP structurally more similar to ASSIGN_DIM.

4 years agoPrevent tempnam tests conflicts
Christoph M. Becker [Fri, 7 Aug 2020 12:56:54 +0000 (14:56 +0200)]
Prevent tempnam tests conflicts

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 7 Aug 2020 12:37:36 +0000 (14:37 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix bug #70574: Move files to proper locale dir

4 years agoFix bug #70574: Move files to proper locale dir
Florian Engelhardt [Wed, 5 Aug 2020 11:33:52 +0000 (13:33 +0200)]
Fix bug #70574: Move files to proper locale dir

Closes GH-5940.

4 years agoFix file clash in zlib test
Nikita Popov [Thu, 6 Aug 2020 10:34:14 +0000 (12:34 +0200)]
Fix file clash in zlib test

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Thu, 6 Aug 2020 10:03:57 +0000 (12:03 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79934: CRLF-only line in heredoc causes parsing error

4 years agoFix #79934: CRLF-only line in heredoc causes parsing error
Pieter van den Ham [Wed, 5 Aug 2020 18:21:26 +0000 (20:21 +0200)]
Fix #79934: CRLF-only line in heredoc causes parsing error

Fixes the function `next_newline()` in zend_language_scanner.l. The
function now correctly returns a newline_len of 2 for "\r\n".

Closes GH-5944.

4 years agoCheck ps -p availability in process title test
Nikita Popov [Wed, 5 Aug 2020 10:23:27 +0000 (12:23 +0200)]
Check ps -p availability in process title test

4 years agoAdd privilege check in pcntl_unshare test
Nikita Popov [Wed, 5 Aug 2020 07:53:22 +0000 (09:53 +0200)]
Add privilege check in pcntl_unshare test

Privileges for CLONE_NEWPID were not checked.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Wed, 5 Aug 2020 14:42:13 +0000 (16:42 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix memory leak on socket_sendmsg() / socket_recvmsg() error

4 years agoFix memory leak on socket_sendmsg() / socket_recvmsg() error
Nikita Popov [Wed, 5 Aug 2020 08:55:41 +0000 (10:55 +0200)]
Fix memory leak on socket_sendmsg() / socket_recvmsg() error

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Wed, 5 Aug 2020 13:43:49 +0000 (15:43 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed bug #79930

4 years agoFixed bug #79930
Nikita Popov [Wed, 5 Aug 2020 13:41:42 +0000 (15:41 +0200)]
Fixed bug #79930

We're inserting src_zval, so that's what we should addref.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Wed, 5 Aug 2020 13:18:03 +0000 (15:18 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix iov_base pointer type for illumos

4 years agoFix iov_base pointer type for illumos
David Carlier [Wed, 5 Aug 2020 09:09:18 +0000 (10:09 +0100)]
Fix iov_base pointer type for illumos

These systems has two versions of the iovec interface dependent on
compiler flags passed, the legacy version causing little build issue.

Closes GH-5939.

4 years agoBackport bless_tests.php changes from PHP 8
Nikita Popov [Wed, 5 Aug 2020 12:59:56 +0000 (14:59 +0200)]
Backport bless_tests.php changes from PHP 8

4 years agoUnset ai_canonname field in dump
Nikita Popov [Wed, 5 Aug 2020 12:56:15 +0000 (14:56 +0200)]
Unset ai_canonname field in dump

Okay, looks like ai_canonname does not get set on macos even if
AI_CANONNAME is specified, so canonicalize this in the other
direction instead and unset ai_canonname if it is present.

4 years agoCheck ps -p availability in proc_nice test
Nikita Popov [Wed, 5 Aug 2020 09:15:49 +0000 (11:15 +0200)]
Check ps -p availability in proc_nice test

4 years agoSet AI_CANONNAME flag in socket_addrinfo test
Nikita Popov [Wed, 5 Aug 2020 09:11:17 +0000 (11:11 +0200)]
Set AI_CANONNAME flag in socket_addrinfo test

Musl always populates ai_canonname. Set the flag to avoid output
discrepancies.

4 years agoAdd ipv6 skipif to test
Nikita Popov [Wed, 5 Aug 2020 09:02:21 +0000 (11:02 +0200)]
Add ipv6 skipif to test

This was done for the -unix variant, but not the (formerly
windows-only?) main test.

4 years agoImprove privilege check in pcntl_setpriority() test
Nikita Popov [Wed, 5 Aug 2020 07:58:34 +0000 (09:58 +0200)]
Improve privilege check in pcntl_setpriority() test

We need CAP_SYS_NICE privileges, which might not be available
just because we're running as root (Docker...)

4 years agoSuppress warning in pcntl_unshare skipif
Nikita Popov [Tue, 4 Aug 2020 14:05:11 +0000 (16:05 +0200)]
Suppress warning in pcntl_unshare skipif

4 years agoUse standard types in fopencookie test
Nikita Popov [Tue, 4 Aug 2020 13:54:31 +0000 (15:54 +0200)]
Use standard types in fopencookie test

Instead of internal __size_t / __off64_t types use ssize_t and off64_t.
This makes it work on musl as well.

4 years agoRemove posix_kill() test
Nikita Popov [Tue, 4 Aug 2020 13:06:19 +0000 (15:06 +0200)]
Remove posix_kill() test

This test is doing something really dubious. There's a race
condition here that would kill some poor process that happens
to start at just the wrong time.

4 years agoRelax error message check
Nikita Popov [Tue, 4 Aug 2020 11:14:12 +0000 (13:14 +0200)]
Relax error message check