]> granicus.if.org Git - php/log
php
4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Tue, 8 Dec 2020 16:02:13 +0000 (17:02 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  PDO MySQL: Normalize handling of empty stored procedure result set

4 years agoPDO MySQL: Normalize handling of empty stored procedure result set
Nikita Popov [Tue, 8 Dec 2020 13:28:18 +0000 (14:28 +0100)]
PDO MySQL: Normalize handling of empty stored procedure result set

MySQL always returns a trailing empty result set for stored
procedure calls, which is used to convey status information.
The PDO MySQL implementation is presently confused about what to
do with it: If mysqlnd is used and native prepared statements are
used, this result set is skipped. In all other cases it is not
skipped. We also have quite a few XFAILed tests relating to this.

This patch normalizes (for PHP-8.0 only) the behavior towards
always retaining the empty result set. This is simply how MySQL
stored procedures work (some expletives omitted here) and we can't
distinguish this "useless" result set from an empty result of a
multi query. Multi queries are not a concern for native prepared
statements, as PDO does not allow them in that case, but they are
a concern for emulated prepared statements.

Closes GH-6497.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Tue, 8 Dec 2020 15:42:54 +0000 (16:42 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Handle column count change in PDO MySQL

4 years agoHandle column count change in PDO MySQL
Nikita Popov [Tue, 8 Dec 2020 15:37:00 +0000 (16:37 +0100)]
Handle column count change in PDO MySQL

This has been fixed for PDO SQlite by GH-4313, however the same
issue also applied to PDO MySQL.

Move the column count setting function into the main PDO layer
(and export it) and then use it in both PDO SQLite and PDO MySQL.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Tue, 8 Dec 2020 15:04:08 +0000 (16:04 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Enable XFAILed test

4 years agoEnable XFAILed test
Nikita Popov [Tue, 8 Dec 2020 15:03:18 +0000 (16:03 +0100)]
Enable XFAILed test

This one had a rather scary XFAIL message, but seems to work just
fine...

4 years agoMerge branch 'PHP-8.0'
Christoph M. Becker [Tue, 8 Dec 2020 11:25:03 +0000 (12:25 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix #48725: Support for flushing in zlib stream

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Tue, 8 Dec 2020 11:24:09 +0000 (12:24 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #48725: Support for flushing in zlib stream

4 years agoFix #48725: Support for flushing in zlib stream
Christoph M. Becker [Wed, 19 Aug 2020 16:19:08 +0000 (18:19 +0200)]
Fix #48725: Support for flushing in zlib stream

When `php_zlib_deflate_filter()` is called with `PSFS_FLAG_FLUSH_INC`
but without new buckets being available (e.g. because a user calls
`rewind()` after writing to the stream), we have to make sure that any
pending data are flushed.  This could basically be done like in the
attached patch[1], but that could cause unnessary flushes, which can be
harmful for compression, and adds unnecessary flush markers to the
stream.  Thus, we use the `php_zlib_filter_data.finished` field, which
has not been used for `zlib.deflate` filters, and properly keep track
of the need to flush.

[1] <https://bugs.php.net/patch-display.php?bug_id=48725&patch=zlib-filter-flush-fix.patch&revision=latest>

Closes GH-6019.

4 years agoMerge branch 'PHP-8.0'
Christoph M. Becker [Tue, 8 Dec 2020 10:49:41 +0000 (11:49 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix #77069: stream filter loses final block of data

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Tue, 8 Dec 2020 10:49:14 +0000 (11:49 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #77069: stream filter loses final block of data

4 years agoFix #77069: stream filter loses final block of data
Christoph M. Becker [Tue, 22 Sep 2020 14:02:01 +0000 (16:02 +0200)]
Fix #77069: stream filter loses final block of data

Reading from a stream may return greater than zero, but nonetheless the
stream's EOF flag may have been set.  We have to cater to this
condition by setting the close flag for filters.

We also have to cater to that change in the zlib.inflate filter:

If `inflate()` is called with flush mode `Z_FINISH`, but the output
buffer is not large enough to inflate all available data, it fails with
`Z_BUF_ERROR`.  However, `Z_BUF_ERROR` is not fatal; in fact, the zlib
manual states: "If deflate returns with Z_OK or Z_BUF_ERROR, this
function must be called again with Z_FINISH and more output space
(updated avail_out) but no more input data, until it returns with
Z_STREAM_END or an error."  Hence, we do so.

Closes GH-6001.

4 years agoMerge branch 'PHP-8.0'
Christoph M. Becker [Tue, 8 Dec 2020 10:44:19 +0000 (11:44 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  ldap_exop_whoami() does not return TRUE

4 years agoldap_exop_whoami() does not return TRUE
Christoph M. Becker [Tue, 8 Dec 2020 10:14:27 +0000 (11:14 +0100)]
ldap_exop_whoami() does not return TRUE

Closes GH-6496.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Tue, 8 Dec 2020 10:36:03 +0000 (11:36 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed bug #63185

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Tue, 8 Dec 2020 10:35:27 +0000 (11:35 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fixed bug #63185

4 years agoFixed bug #63185
Nikita Popov [Tue, 8 Dec 2020 10:30:54 +0000 (11:30 +0100)]
Fixed bug #63185

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Tue, 8 Dec 2020 10:11:05 +0000 (13:11 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Avoid unnecessary checks

4 years agoAvoid unnecessary checks
Dmitry Stogov [Tue, 8 Dec 2020 10:10:35 +0000 (13:10 +0300)]
Avoid unnecessary checks

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Mon, 7 Dec 2020 11:36:16 +0000 (12:36 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix another typed resource issue in unserialization

4 years agoFix another typed resource issue in unserialization
Nikita Popov [Mon, 7 Dec 2020 11:33:23 +0000 (12:33 +0100)]
Fix another typed resource issue in unserialization

We also need to discard old entries in the ref_props HT when values
are overwritten.

We should really forbid these kinds of overwrites. I believe they
can only occur in manually crafted serialization strings, and
cause so many problems...

Fixes oss-fuzz #28257.

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Mon, 7 Dec 2020 10:29:11 +0000 (13:29 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed bug #80480 (Segmentation fault with JIT enabled)

4 years agoFixed bug #80480 (Segmentation fault with JIT enabled)
Dmitry Stogov [Mon, 7 Dec 2020 10:28:37 +0000 (13:28 +0300)]
Fixed bug #80480 (Segmentation fault with JIT enabled)

4 years agoClarify and assert that printf() and friends never return NULL
Christoph M. Becker [Sun, 6 Dec 2020 15:02:57 +0000 (16:02 +0100)]
Clarify and assert that printf() and friends never return NULL

Closes GH-6491.

4 years agoIncrease timeout on msan job
Nikita Popov [Sat, 5 Dec 2020 09:38:40 +0000 (10:38 +0100)]
Increase timeout on msan job

[ci skip]

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Fri, 4 Dec 2020 16:01:19 +0000 (17:01 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed bug #80458

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Fri, 4 Dec 2020 16:00:20 +0000 (17:00 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fixed bug #80458

4 years agoFixed bug #80458
Dharman [Wed, 2 Dec 2020 21:24:20 +0000 (21:24 +0000)]
Fixed bug #80458

If there is no result set (e.g. for upsert queries), still allow
fetching to occur without error, i.e. treat it the same way as
an empty result set.

This normalizes behavior between native and emulated prepared
statements and addresses a regression in PHP 7.4.13.

4 years agoMerge branch 'PHP-8.0'
Christoph M. Becker [Fri, 4 Dec 2020 12:05:08 +0000 (13:05 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix #75102: `PharData` says invalid checksum for valid tar

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Fri, 4 Dec 2020 12:04:16 +0000 (13:04 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #75102: `PharData` says invalid checksum for valid tar

4 years agoFix #75102: `PharData` says invalid checksum for valid tar
Christoph M. Becker [Wed, 2 Dec 2020 13:49:43 +0000 (14:49 +0100)]
Fix #75102: `PharData` says invalid checksum for valid tar

Apparently, there are broken tarballs out there which are actually in
ustar format, but did not write the `ustar` marker.  Since popular tar
tools like GNU tar and 7zip have no issues dealing with such tarballs,
Phar should also be more resilient.

Thus, when the first checksum check of a tarball in (presumed) in old-
style format fails, we check whether the checksum would be suitable for
ustar format; if so, we treat the tarball as being in ustar format.

Closes GH-6479.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Fri, 4 Dec 2020 11:57:37 +0000 (12:57 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix removal of type source during unserialization

4 years agoFix removal of type source during unserialization
Nikita Popov [Fri, 4 Dec 2020 11:56:05 +0000 (12:56 +0100)]
Fix removal of type source during unserialization

Missed a check for info in this code. Add it, and add an assertion
in type source removal to make it easier to catch this issue.

Fixes oss-fuzz #28208 and #28257.

4 years agoReturn early from php_search_array()
Christoph M. Becker [Fri, 4 Dec 2020 00:15:48 +0000 (01:15 +0100)]
Return early from php_search_array()

4 years agoMerge branch 'PHP-8.0'
George Peter Banyard [Thu, 3 Dec 2020 17:44:47 +0000 (17:44 +0000)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Standardize behaviour for int message number between functions
  Add tests for passing a UID instead of a message number

4 years agoStandardize behaviour for int message number between functions
George Peter Banyard [Tue, 1 Dec 2020 01:43:17 +0000 (01:43 +0000)]
Standardize behaviour for int message number between functions

4 years agoAdd tests for passing a UID instead of a message number
George Peter Banyard [Mon, 30 Nov 2020 23:12:54 +0000 (23:12 +0000)]
Add tests for passing a UID instead of a message number

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Thu, 3 Dec 2020 11:05:19 +0000 (12:05 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Upload coverage data to codecov.io

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Thu, 3 Dec 2020 11:05:14 +0000 (12:05 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Upload coverage data to codecov.io

4 years agoUpload coverage data to codecov.io
Paul Crovella [Thu, 3 Dec 2020 03:14:09 +0000 (19:14 -0800)]
Upload coverage data to codecov.io

Closes GH-6486.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Thu, 3 Dec 2020 10:02:16 +0000 (11:02 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix mysqli_expire_password test for mariadb

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Thu, 3 Dec 2020 10:02:11 +0000 (11:02 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix mysqli_expire_password test for mariadb

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Thu, 3 Dec 2020 09:56:53 +0000 (10:56 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix mysqli_expire_password test for mariadb

4 years agoFix mysqli_expire_password test for mariadb
Daniel Black [Wed, 2 Dec 2020 21:39:08 +0000 (08:39 +1100)]
Fix mysqli_expire_password test for mariadb

In MariaDB-10.4.3 EXPIRE passwords where supported for
MariaDB. This only behaves like MySQL when the system
variable disconnect_on_expired_passwords=1.

MariaDB if there was no password it could not be considered
expired. So the test is adjusted to use actual passwords.
(MariaDB commit a94b20a8e0d9e64eeaabdaaa7a3e03fcdb8a686e)

The error codes produced my MariaDB are different
however still conforming to the SQL specification.

Closes GH-6480.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Thu, 3 Dec 2020 09:45:32 +0000 (10:45 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  fix mysqli_stmt_get_result_metadata_fetch_field test for mariadb

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Thu, 3 Dec 2020 09:45:27 +0000 (10:45 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  fix mysqli_stmt_get_result_metadata_fetch_field test for mariadb

4 years agofix mysqli_stmt_get_result_metadata_fetch_field test for mariadb
Daniel Black [Thu, 3 Dec 2020 01:02:55 +0000 (12:02 +1100)]
fix mysqli_stmt_get_result_metadata_fetch_field test for mariadb

MariaDB extended the default decimal field to 39 characters
instead of MySQL's 31 characters.

This small change allows the test to pass on MySQL and MariaDB.

Closes GH-6484.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Thu, 3 Dec 2020 09:43:16 +0000 (10:43 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Remove PHP 5 mysqli tests
  Fix typos in mysql tests

4 years agoRemove PHP 5 mysqli tests
Dharman [Wed, 2 Dec 2020 23:24:51 +0000 (23:24 +0000)]
Remove PHP 5 mysqli tests

These tests all require functions that no longer exist.

4 years agoFix typos in mysql tests
Dharman [Wed, 2 Dec 2020 22:58:38 +0000 (22:58 +0000)]
Fix typos in mysql tests

%d because of line endings on Windows

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Thu, 3 Dec 2020 09:22:27 +0000 (10:22 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Backport fix for bug #78750

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Thu, 3 Dec 2020 09:22:21 +0000 (10:22 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Backport fix for bug #78750

4 years agoBackport fix for bug #78750
Peter Kokot [Sun, 7 Jun 2020 19:53:39 +0000 (21:53 +0200)]
Backport fix for bug #78750

Cherry-picks
fe2afef36fc78c267133ddd403f48e0ee799efbc
and
86e2b7bb70131b48636cded57e5bc62b81b79865.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Thu, 3 Dec 2020 08:45:23 +0000 (09:45 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Make is_file() and friends return false when path contains 0-byte

4 years agoMake is_file() and friends return false when path contains 0-byte
Christian Schneider [Wed, 2 Dec 2020 09:21:08 +0000 (10:21 +0100)]
Make is_file() and friends return false when path contains 0-byte

These functions now return false silently:
is_writable, is_readable, is_executable, is_file, is_dir, is_link,
file_exists

These functions now throw a warning an return false (rather than
throwing a ValueError):
fileperms, fileinode, filesize, fileowner, filegroup, filetype,
fileatime, filemtime, filectime, lstat, stat

See also https://externals.io/message/112333.

Closes GH-6478.

4 years agoMerge branch 'PHP-8.0'
Christoph M. Becker [Wed, 2 Dec 2020 15:53:43 +0000 (16:53 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix failing VirtualProtect() calls

4 years agoFix failing VirtualProtect() calls
Christoph M. Becker [Wed, 2 Dec 2020 14:06:30 +0000 (15:06 +0100)]
Fix failing VirtualProtect() calls

Whenever JIT is disabled due to incompatibilities, we also need to set
`JIT_G(on)` to zero.

Closes GH-6470.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Wed, 2 Dec 2020 10:29:56 +0000 (11:29 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed bug #80457

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Wed, 2 Dec 2020 10:29:41 +0000 (11:29 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fixed bug #80457

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Wed, 2 Dec 2020 10:29:06 +0000 (11:29 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed bug #80457

4 years agoFixed bug #80457
Nikita Popov [Wed, 2 Dec 2020 10:26:10 +0000 (11:26 +0100)]
Fixed bug #80457

On x32 sizeof(size_t) != sizeof(zend_long), so we need to be
careful with sign extension here.

Patch by bruno dot premont at restena dot lu.

4 years agoDon't disable phpdbg on macos
Nikita Popov [Wed, 2 Dec 2020 09:08:34 +0000 (10:08 +0100)]
Don't disable phpdbg on macos

I'm not sure what the original issue here was, but it seems to
be working fine now, so let's make sure it stays that way...

4 years agoEnsure consistent error message in phpdbg parser
Nikita Popov [Wed, 2 Dec 2020 09:40:57 +0000 (10:40 +0100)]
Ensure consistent error message in phpdbg parser

This would be either $end or "end of file" depending on bison
version. Explicitly specify "end of command" instead, which seems
more appropriate in context.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Wed, 2 Dec 2020 09:55:45 +0000 (10:55 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Don't throw from imagecreatefromstring() with too short string

4 years agoDon't throw from imagecreatefromstring() with too short string
Nikita Popov [Wed, 2 Dec 2020 09:51:55 +0000 (10:51 +0100)]
Don't throw from imagecreatefromstring() with too short string

If the string is too short, we should treat this the same way as
an unrecognized image type. This function should be usable to
determine whether something is a valid image without doing any
checks beforehand.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Wed, 2 Dec 2020 09:19:42 +0000 (10:19 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed bug #80462

4 years agoFixed bug #80462
Nikita Popov [Wed, 2 Dec 2020 09:19:32 +0000 (10:19 +0100)]
Fixed bug #80462

4 years agoFlesh out HashTable insertion APIs
Sara Golemon [Fri, 7 Aug 2020 14:31:52 +0000 (14:31 +0000)]
Flesh out HashTable insertion APIs

Fills out the array/object-property insert helpers for zend_array, zend_object, and zend_reference.

This adds the following matrix of 18 APIs
add_next_index_T()
add_index_T()
add_assoc_T()
add_assoc_T_ex()
add_property_T()
add_property_T_ex()

Where T in array, object, reference

Converted internal callsites currently doing an explicit object wrap.

4 years agoMerge branch 'PHP-8.0'
George Peter Banyard [Tue, 1 Dec 2020 16:39:11 +0000 (16:39 +0000)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Backport IMAP test modernization to PHP-8.0 branch

4 years agoBackport IMAP test modernization to PHP-8.0 branch
George Peter Banyard [Tue, 1 Dec 2020 15:18:54 +0000 (15:18 +0000)]
Backport IMAP test modernization to PHP-8.0 branch

Closes GH-6476

4 years agoMerge branch 'PHP-8.0'
Christoph M. Becker [Tue, 1 Dec 2020 16:00:53 +0000 (17:00 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix #73809: Phar Zip parse crash - mmap fail

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Tue, 1 Dec 2020 15:59:47 +0000 (16:59 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #73809: Phar Zip parse crash - mmap fail

4 years agoFix #73809: Phar Zip parse crash - mmap fail
Christoph M. Becker [Tue, 1 Dec 2020 13:20:39 +0000 (14:20 +0100)]
Fix #73809: Phar Zip parse crash - mmap fail

Phar signatures practically are of limited size; for the MD5 and SHA
hashes the size is fixed (at most 64 bytes for SHA512); for OpenSSL
public keys there is no size limit in theory, but "64 KiB ought to be
good enough for anybody".  So we check for that limit, to avoid fatal
errors due to out of memory conditions.

Since it is neither possible to have the signature compressed in the
ZIP archive, nor is it possible to manually add a signature via Phar,
we use ZipArchive to create a suitable archive for the test on the fly.

Closes GH-6474.

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Tue, 1 Dec 2020 13:47:11 +0000 (16:47 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed bug #80447 (Strange out of memory error when running with JIT)

4 years agoFixed bug #80447 (Strange out of memory error when running with JIT)
Dmitry Stogov [Tue, 1 Dec 2020 13:46:41 +0000 (16:46 +0300)]
Fixed bug #80447 (Strange out of memory error when running with JIT)

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Tue, 1 Dec 2020 13:43:41 +0000 (16:43 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Bug #80447 (Strange out of memory error when running with JIT)

4 years agoBug #80447 (Strange out of memory error when running with JIT)
Dmitry Stogov [Tue, 1 Dec 2020 13:43:05 +0000 (16:43 +0300)]
Bug #80447 (Strange out of memory error when running with JIT)

4 years agoDon't try to open null file
Nikita Popov [Tue, 1 Dec 2020 12:02:29 +0000 (13:02 +0100)]
Don't try to open null file

If the loader is not found, directly return null, instead of
trying to open it.

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Tue, 1 Dec 2020 12:26:37 +0000 (15:26 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Disable stack reuse optimization for x86 PIC code. It may clobber local variable used for Global Offset Table.

4 years agoDisable stack reuse optimization for x86 PIC code. It may clobber local variable...
Dmitry Stogov [Tue, 1 Dec 2020 12:20:06 +0000 (15:20 +0300)]
Disable stack reuse optimization for x86 PIC code. It may clobber local variable used for Global Offset Table.

4 years agoDetermine run-tests executables consistently
Nikita Popov [Tue, 1 Dec 2020 11:35:05 +0000 (12:35 +0100)]
Determine run-tests executables consistently

4 years agoDon't pass null to strlen()
Nikita Popov [Mon, 30 Nov 2020 16:01:09 +0000 (17:01 +0100)]
Don't pass null to strlen()

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Tue, 1 Dec 2020 10:50:22 +0000 (11:50 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Don't use scope when validating Attribute

4 years agoDon't use scope when validating Attribute
Nikita Popov [Tue, 1 Dec 2020 10:49:27 +0000 (11:49 +0100)]
Don't use scope when validating Attribute

This is not safe to do at this point. Even if we made it safe,
we'd see inconsistencies due to a partially compiled class.

Fixes oss-fuzz #28129.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Tue, 1 Dec 2020 10:32:28 +0000 (11:32 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix use after free with file cache and arena allocated strings

4 years agoFix use after free with file cache and arena allocated strings
Nikita Popov [Tue, 1 Dec 2020 10:31:23 +0000 (11:31 +0100)]
Fix use after free with file cache and arena allocated strings

4 years agoAdd const modifier for zend_extension members
codinghuang [Fri, 27 Nov 2020 12:29:59 +0000 (20:29 +0800)]
Add const modifier for zend_extension members

Closes GH-6462.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Tue, 1 Dec 2020 09:24:02 +0000 (10:24 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Don't mark cpu_supports functions as always inline

4 years agoDon't mark cpu_supports functions as always inline
Nikita Popov [Tue, 1 Dec 2020 09:22:36 +0000 (10:22 +0100)]
Don't mark cpu_supports functions as always inline

The use of no-sanitize may result in an inlining failure, which
will be promoted into a compile error by always-inline. Use a
normal inlining hint without enforcing it.

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Tue, 1 Dec 2020 08:34:36 +0000 (11:34 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed incorrect "skipif.inc" include

4 years agoFixed incorrect "skipif.inc" include
Dmitry Stogov [Tue, 1 Dec 2020 08:34:09 +0000 (11:34 +0300)]
Fixed incorrect "skipif.inc" include

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Tue, 1 Dec 2020 06:59:25 +0000 (09:59 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Skip test if JIT is not available

4 years agoSkip test if JIT is not available
Dmitry Stogov [Tue, 1 Dec 2020 06:58:33 +0000 (09:58 +0300)]
Skip test if JIT is not available

4 years agohash: Add build dir for ext/hash/murmur
Anatol Belski [Mon, 30 Nov 2020 19:48:05 +0000 (20:48 +0100)]
hash: Add build dir for ext/hash/murmur

Signed-off-by: Anatol Belski <ab@php.net>
4 years agoMerge branch 'PHP-8.0'
Christoph M. Becker [Mon, 30 Nov 2020 15:04:04 +0000 (16:04 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix #62004: SplFileObject: fgets after seek returns wrong line

4 years agoFix #62004: SplFileObject: fgets after seek returns wrong line
Christoph M. Becker [Wed, 18 Nov 2020 12:41:21 +0000 (13:41 +0100)]
Fix #62004: SplFileObject: fgets after seek returns wrong line

As it is, `::seek(0)` sets the file pointer to the beginning of the
file, but `::seek($n)` where `$n > 0` sets the file pointer to the
beginning of the following line, having line `$n` already read into the
line buffer.  This is pretty inconsistent; we fix it by always seeking
to the beginning of the line.

We also add a test case for the duplicate bug #46569.

Closes GH-6434.

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Mon, 30 Nov 2020 14:56:32 +0000 (17:56 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Preallocate stack space for JIT in execute_ex() to eliminate JIT prologue/epilogue.

4 years agoPreallocate stack space for JIT in execute_ex() to eliminate JIT prologue/epilogue.
Dmitry Stogov [Mon, 30 Nov 2020 14:56:08 +0000 (17:56 +0300)]
Preallocate stack space for JIT in execute_ex() to eliminate JIT prologue/epilogue.

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Mon, 30 Nov 2020 14:47:02 +0000 (17:47 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed "may be used uninitialized" compilation warnings

4 years agoFixed "may be used uninitialized" compilation warnings
Dmitry Stogov [Mon, 30 Nov 2020 14:46:43 +0000 (17:46 +0300)]
Fixed "may be used uninitialized" compilation warnings