]> granicus.if.org Git - php/log
php
4 years agoUPGRADING: Add murmurhash note [ci skip]
Anatol Belski [Sat, 31 Oct 2020 18:19:00 +0000 (19:19 +0100)]
UPGRADING: Add murmurhash note [ci skip]

Signed-off-by: Anatol Belski <ab@php.net>
4 years agoNEWS: Add murmurhash info [ci skip]
Anatol Belski [Sat, 31 Oct 2020 17:50:30 +0000 (18:50 +0100)]
NEWS: Add murmurhash info [ci skip]

Signed-off-by: Anatol Belski <ab@php.net>
4 years agohash: Add MurmurHash3 with streaming support
Anatol Belski [Sun, 30 Aug 2020 12:14:04 +0000 (14:14 +0200)]
hash: Add MurmurHash3 with streaming support

The implementation is based on the upstream PMurHash. The following
variants are implemented

- murmur3a, 32-bit hash
- murmur3c, 128-bit hash for x86
- murmur3f, 128-bit hash for x64

The custom seed support is not targeted by this implementation. It will
need a major change to the API, so then custom arguments can be passed
through `hash_init`. For now, the starting hash is always zero.

Fixes bug #68109, closes #6059

Signed-off-by: Anatol Belski <ab@php.net>
Co-Developed-by: Michael Wallner <mike@php.net>
Signed-off-by: Michael Wallner <mike@php.net>
4 years agoAdd test suite for CP1252 encoding
Alex Dowad [Sun, 18 Oct 2020 12:41:40 +0000 (14:41 +0200)]
Add test suite for CP1252 encoding

Also remove a bogus test (bug62545.phpt) which wrongly assumed that all invalid
characters in CP1251 and CP1252 should map to Unicode 0xFFFD (REPLACEMENT
CHARACTER).

mbstring has an interface to specify what invalid characters should be
replaced with; it's called `mb_substitute_character`. If a user wants to see
the Unicode 'replacement character', they can specify that using
`mb_substitute_character`. But if they specify something else, we should
follow that.

4 years agoFix mbstring support for CP1252 encoding
Alex Dowad [Sun, 18 Oct 2020 12:56:32 +0000 (14:56 +0200)]
Fix mbstring support for CP1252 encoding

It's a bit surprising how much was broken here.

- Identify filter was utterly and completely wrong.
- Instead of handling invalid CP1252 bytes as specified by
  `mb_substitute_character`, it would convert them to Unicode 0xFFFD
  (generic replacement character).
- When converting ISO-8859-1 to CP1252, invalid ISO-8859-1 bytes would
  be passed through silently.
- Unicode codepoints from 0x80-0x9F were converted to CP1252 bytes 0x80-0x9F,
  which is wrong.
- Unicode codepoint 0xFFFD was converted to CP1252 0x9F, which is very wrong.

Also clean up some unneeded code, and make the conversion table consistent with
others by using zero as a 'invalid' marker, rather than 0xFFFD.

4 years agoMerge branch 'PHP-8.0'
Alex Dowad [Fri, 30 Oct 2020 20:12:00 +0000 (22:12 +0200)]
Merge branch 'PHP-8.0'

4 years agoFix test added in d44235acaeb4
Alex Dowad [Fri, 30 Oct 2020 20:11:27 +0000 (22:11 +0200)]
Fix test added in d44235acaeb4

4 years agoMerge branch 'PHP-8.0'
Alex Dowad [Fri, 30 Oct 2020 20:07:41 +0000 (22:07 +0200)]
Merge branch 'PHP-8.0'

4 years agoConvert numeric string array keys to integers correctly in JITted code
Alex Dowad [Thu, 29 Oct 2020 21:10:04 +0000 (23:10 +0200)]
Convert numeric string array keys to integers correctly in JITted code

While fixing bugs in mbstring, one of my new test cases failed with a strange
error message stating: 'Warning: Undefined array key 1...', when clearly the
array key had been set properly.

GDB'd that sucker and found that JIT'd PHP code was calling directly into
`zend_hash_add_new` (which was not converting the numeric string key to an
integer properly). But where was that code coming from? I examined the disasm,
looked up symbols to figure out where call instructions were going, then grepped
the codebase for those function names. It soon became clear that the disasm I
was looking at was compiled from `zend_jit_fetch_dim_w_helper`.

4 years agoAdd --repeat testing mode
Nikita Popov [Wed, 21 Oct 2020 13:01:47 +0000 (15:01 +0200)]
Add --repeat testing mode

This testing mode executes the test multiple times in the same
process (but in different requests). It is primarily intended to
catch tracing JIT bugs, but also catches state leaks across
requests.

Closes GH-6365.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Fri, 30 Oct 2020 16:24:02 +0000 (17:24 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  FIxed bug #80299

4 years agoFIxed bug #80299
Nikita Popov [Fri, 30 Oct 2020 16:23:18 +0000 (17:23 +0100)]
FIxed bug #80299

The must_wrap was leaking across iterations.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Fri, 30 Oct 2020 14:52:59 +0000 (15:52 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix SSA integrity violation for type inference in dead code

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Fri, 30 Oct 2020 14:52:24 +0000 (15:52 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix SSA integrity violation for type inference in dead code

4 years agoFix SSA integrity violation for type inference in dead code
Nikita Popov [Fri, 30 Oct 2020 14:48:03 +0000 (15:48 +0100)]
Fix SSA integrity violation for type inference in dead code

The foreach body can never be executed and thus may contain empty
types. We should still uphold our SSA integrity invariants in that
case.

4 years agoMerge branch 'PHP-8.0'
Christoph M. Becker [Fri, 30 Oct 2020 14:50:17 +0000 (15:50 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix bug79177.phpt wrt. JIT

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Fri, 30 Oct 2020 14:49:48 +0000 (15:49 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix bug79177.phpt wrt. JIT

4 years agoFix bug79177.phpt wrt. JIT
Christoph M. Becker [Fri, 30 Oct 2020 11:44:37 +0000 (12:44 +0100)]
Fix bug79177.phpt wrt. JIT

JIT ignores that the `zend_write` callback is overwritten, so we define
our own callback and caller.

We also fix the "inconsistent DLL binding" warnings on Windows, by
introducing `PHP_ZEND_TEST_API`.

Closes GH-6391.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Fri, 30 Oct 2020 11:39:47 +0000 (12:39 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix signed integer overflow

4 years agoFix signed integer overflow
Nikita Popov [Fri, 30 Oct 2020 11:37:22 +0000 (12:37 +0100)]
Fix signed integer overflow

Fixes oss-fuzz #26763.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Fri, 30 Oct 2020 10:13:44 +0000 (11:13 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed bug #80290

4 years agoFixed bug #80290
Nikita Popov [Fri, 30 Oct 2020 10:11:16 +0000 (11:11 +0100)]
Fixed bug #80290

Dropping the dtor arg args[3] rather than using STR_COPY: Since
PHP 8, we no longer support separation in call_user_function(),
so we also don't need to worry about things like arguments being
replaced with references.

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Fri, 30 Oct 2020 10:10:08 +0000 (13:10 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Create TSSA loops for recursive call/return traces and move invariant type guards out of loops.

4 years agoCreate TSSA loops for recursive call/return traces and move invariant type guards...
Dmitry Stogov [Fri, 30 Oct 2020 10:08:31 +0000 (13:08 +0300)]
Create TSSA loops for recursive call/return traces and move invariant type guards out of loops.

4 years agoUse constant size string in hash bench.php
divinity76 [Tue, 27 Oct 2020 15:19:58 +0000 (16:19 +0100)]
Use constant size string in hash bench.php

I don't like the previous behaviour where the bytes to hash change
every time the code changes, that may make it difficult to compare
hash() performance changes over time.

Use a fixed number instead, and allow passing an override for a
different length.

Closes GH-6386.

[ci skip]

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Thu, 29 Oct 2020 15:42:00 +0000 (16:42 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix bug #72413: Segfault with get_result and PS cursors

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Thu, 29 Oct 2020 15:35:06 +0000 (16:35 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix bug #72413: Segfault with get_result and PS cursors

4 years agoFix bug #72413: Segfault with get_result and PS cursors
Dharman [Thu, 17 Sep 2020 11:35:26 +0000 (12:35 +0100)]
Fix bug #72413: Segfault with get_result and PS cursors

We cannot simply switch to use_result here, because the fetch_row
methods in get_result mode and in use_result/store_result mode
are different: In one case it accepts a statement, in the other
a return value zval. Thus, doing a switch to use_result results
in a segfault when trying to fetch a row.

Actually supporting get_result with cursors would require adding
cursor support in mysqlnd_result, not just mysqlnd_ps. That would
be a significant amount of effort and, given the age of the issue,
does not appear to be particularly likely to happen soon.

As such, we simply generate an error when using get_result()
with cursors, which is much better than causing a segfault.
Instead, parameter binding needs to be used.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Thu, 29 Oct 2020 13:18:22 +0000 (14:18 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Handle errors during PDO row fetch

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Thu, 29 Oct 2020 13:18:04 +0000 (14:18 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Handle errors during PDO row fetch

4 years agoHandle errors during PDO row fetch
Nikita Popov [Thu, 29 Oct 2020 13:07:08 +0000 (14:07 +0100)]
Handle errors during PDO row fetch

The EOF flag also gets set on error, so we always end up ignoring
errors here.

However, we should only check errors for unbuffered results. For
buffered results, this function is guaranteed not to error, and
querying the errno may return an unrelated error.

4 years agoMerge branch 'PHP-8.0'
Christoph M. Becker [Thu, 29 Oct 2020 12:11:00 +0000 (13:11 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix format specifier

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

* PHP-7.4:
  Fix format specifier

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

* PHP-7.3:
  Fix format specifier

4 years agoFix format specifier
Christoph M. Becker [Thu, 29 Oct 2020 11:58:45 +0000 (12:58 +0100)]
Fix format specifier

In this function, `i` is of type `size_t`.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Thu, 29 Oct 2020 11:47:32 +0000 (12:47 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Report gone away error in one more place

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Thu, 29 Oct 2020 11:47:22 +0000 (12:47 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Report gone away error in one more place

4 years agoReport gone away error in one more place
Nikita Popov [Thu, 29 Oct 2020 10:43:17 +0000 (11:43 +0100)]
Report gone away error in one more place

4 years agoMerge branch 'PHP-8.0'
Christoph M. Becker [Thu, 29 Oct 2020 11:16:41 +0000 (12:16 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  [ci skip] Fix NEWS order

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Thu, 29 Oct 2020 11:16:20 +0000 (12:16 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  [ci skip] Fix NEWS order

4 years ago[ci skip] Fix NEWS order
Christoph M. Becker [Thu, 29 Oct 2020 11:15:31 +0000 (12:15 +0100)]
[ci skip] Fix NEWS order

4 years agoMerge branch 'PHP-8.0'
Christoph M. Becker [Thu, 29 Oct 2020 11:04:21 +0000 (12:04 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix #44618: Fetching may rely on uninitialized data

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Thu, 29 Oct 2020 11:02:54 +0000 (12:02 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #44618: Fetching may rely on uninitialized data

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Thu, 29 Oct 2020 11:00:07 +0000 (12:00 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #44618: Fetching may rely on uninitialized data

4 years agoFix #44618: Fetching may rely on uninitialized data
Christoph M. Becker [Thu, 29 Oct 2020 10:52:10 +0000 (11:52 +0100)]
Fix #44618: Fetching may rely on uninitialized data

Unless `SQLGetData()` returns `SQL_SUCCESS` or `SQL_SUCCESS_WITH_INFO`,
the `StrLen_or_IndPtr` output argument is not guaranteed to be properly
set.  Thus we handle retrieval failure other than `SQL_ERROR` by
yielding `false` for those column values and raising a warning.

Closes GH-6281.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Thu, 29 Oct 2020 09:40:10 +0000 (10:40 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Retain QUIT_SEND connection state

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Thu, 29 Oct 2020 09:39:58 +0000 (10:39 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Retain QUIT_SEND connection state

4 years agoRetain QUIT_SEND connection state
Nikita Popov [Thu, 29 Oct 2020 09:17:35 +0000 (10:17 +0100)]
Retain QUIT_SEND connection state

If the server goes away while reading a packet, don't go back into
the READY state. This will just cause broken pipe errors down the
line.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Wed, 28 Oct 2020 16:15:51 +0000 (17:15 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed bug #65825

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Wed, 28 Oct 2020 16:15:42 +0000 (17:15 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fixed bug #65825

4 years agoFixed bug #65825
Nikita Popov [Wed, 28 Oct 2020 16:12:35 +0000 (17:12 +0100)]
Fixed bug #65825

Set error_info when we fail to read a packet, instead of throwing
a warning. Additionally we also need to populate the right
error_info in rowp_read -- we'll later take the error from the
packet, not the connection.

No test case, as this is hard to reliably test. I'm using the
test case from:
https://github.com/php/php-src/pull/2131#issuecomment-538374838

4 years agoMerge branch 'PHP-8.0'
Christoph M. Becker [Wed, 28 Oct 2020 12:49:47 +0000 (13:49 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix #79177: FFI doesn't handle well PHP exceptions within callback

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Wed, 28 Oct 2020 12:49:09 +0000 (13:49 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #79177: FFI doesn't handle well PHP exceptions within callback

4 years agoFix #79177: FFI doesn't handle well PHP exceptions within callback
Christoph M. Becker [Wed, 28 Oct 2020 11:01:28 +0000 (12:01 +0100)]
Fix #79177: FFI doesn't handle well PHP exceptions within callback

We have to error on unhandled exceptions in FFI callbacks, to avoid
passing back undefined values.

This has been discussed and agreed upon in a previous PR[1].

[1] <https://github.com/php/php-src/pull/5120>

Closes GH-6366.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Wed, 28 Oct 2020 11:18:26 +0000 (12:18 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed bug #66528

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Wed, 28 Oct 2020 11:18:17 +0000 (12:18 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fixed bug #66528

4 years agoFixed bug #66528
Nikita Popov [Wed, 28 Oct 2020 10:58:07 +0000 (11:58 +0100)]
Fixed bug #66528

Report errors in commit, rollback and autocommit handlers.

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Wed, 28 Oct 2020 10:51:55 +0000 (13:51 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed run-time binding of preloaded dynamically declared function

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Dmitry Stogov [Wed, 28 Oct 2020 10:51:17 +0000 (13:51 +0300)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fixed run-time binding of preloaded dynamically declared function

4 years agoFixed run-time binding of preloaded dynamically declared function
Dmitry Stogov [Wed, 28 Oct 2020 10:50:14 +0000 (13:50 +0300)]
Fixed run-time binding of preloaded dynamically declared function

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Wed, 28 Oct 2020 10:37:54 +0000 (11:37 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Handle mysqli errors in more cases
  Sync test with master

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Wed, 28 Oct 2020 10:35:38 +0000 (11:35 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Handle mysqli errors in more cases
  Sync test with master

4 years agoHandle mysqli errors in more cases
Dharman [Thu, 17 Sep 2020 22:45:17 +0000 (23:45 +0100)]
Handle mysqli errors in more cases

Report errors autocommit, commit, rollback and mysqli_stmt_attr_set.

Additionally, copy the error from conn to stmt when preparing fails,
so these errors are also handled by mysqli_stmt_prepare.

Closes GH-6157.

4 years agoSync test with master
Nikita Popov [Wed, 28 Oct 2020 10:30:22 +0000 (11:30 +0100)]
Sync test with master

Sync ext/mysqli/tests/mysqli_report.phpt with PHP-8.0/master, as
the current difference in indentation makes it hard to merge.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Wed, 28 Oct 2020 10:04:41 +0000 (11:04 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix bug #79375

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Wed, 28 Oct 2020 10:04:32 +0000 (11:04 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix bug #79375

4 years agoFix bug #79375
Dharman [Sun, 20 Sep 2020 15:32:47 +0000 (16:32 +0100)]
Fix bug #79375

Make sure deadlock errors are properly propagated and reports in
a number of places in mysqli and PDO MySQL.

This also fixes a memory and a segfault that can occur under these
conditions.

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Wed, 28 Oct 2020 09:59:42 +0000 (12:59 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Don't force rebuild of symbol table, when populating $http_response_header variable by the HTTP stream wrapper

4 years agoDon't force rebuild of symbol table, when populating $http_response_header variable...
Dmitry Stogov [Wed, 28 Oct 2020 09:59:00 +0000 (12:59 +0300)]
Don't force rebuild of symbol table, when populating $http_response_header variable by the HTTP stream wrapper

4 years agoCheck for null dbh methods in get_gc
Nikita Popov [Wed, 28 Oct 2020 09:44:13 +0000 (10:44 +0100)]
Check for null dbh methods in get_gc

Methods may not be set at the point where get_gc is called. Fixes
a segfault in Laravel.

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Wed, 28 Oct 2020 07:47:56 +0000 (10:47 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed memory leak in Zend/tests/bug78999.phpt

4 years agoFixed memory leak in Zend/tests/bug78999.phpt
Dmitry Stogov [Wed, 28 Oct 2020 07:47:23 +0000 (10:47 +0300)]
Fixed memory leak in Zend/tests/bug78999.phpt

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Tue, 27 Oct 2020 20:45:32 +0000 (23:45 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed tracing JIT support for aliasses (Zend/tests/bug75420.13.phpt and ext/standard/tests/streams/bug60106.phpt)

4 years agoFixed tracing JIT support for aliasses (Zend/tests/bug75420.13.phpt and ext/standard...
Dmitry Stogov [Tue, 27 Oct 2020 20:44:29 +0000 (23:44 +0300)]
Fixed tracing JIT support for aliasses (Zend/tests/bug75420.13.phpt and ext/standard/tests/streams/bug60106.phpt)

4 years agoFix conflict
Dmitry Stogov [Tue, 27 Oct 2020 13:42:26 +0000 (16:42 +0300)]
Fix conflict

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Tue, 27 Oct 2020 13:36:58 +0000 (16:36 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed support for named parameters (Zend/tests/named_params/references.phpt)
  Update NEWS for 8.0.0RC4
  Update NEWS for PHP 8.0.0RC3

4 years agoFixed support for named parameters (Zend/tests/named_params/references.phpt)
Dmitry Stogov [Tue, 27 Oct 2020 13:35:24 +0000 (16:35 +0300)]
Fixed support for named parameters (Zend/tests/named_params/references.phpt)

4 years agoUpdate NEWS for 8.0.0RC4
Gabriel Caruso [Tue, 27 Oct 2020 12:25:17 +0000 (12:25 +0000)]
Update NEWS for 8.0.0RC4

4 years agoUpdate NEWS for PHP 8.0.0RC3
Gabriel Caruso [Tue, 27 Oct 2020 12:07:36 +0000 (12:07 +0000)]
Update NEWS for PHP 8.0.0RC3

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Tue, 27 Oct 2020 10:42:18 +0000 (11:42 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Don't throw for out of bounds offsets in strspn()

4 years agoDon't throw for out of bounds offsets in strspn()
Nikita Popov [Tue, 27 Oct 2020 10:23:49 +0000 (11:23 +0100)]
Don't throw for out of bounds offsets in strspn()

Make strspn($str1, $str2, $offset, $length) behaviorally
equivalent to strspn(substr($str1, $offset, $length), $str2)
by not throwing for out of bounds offset.

There have been two reports that this change cause issues,
including bug #80285.

4 years agoMerge branch 'PHP-8.0'
Máté Kocsis [Tue, 27 Oct 2020 10:28:48 +0000 (11:28 +0100)]
Merge branch 'PHP-8.0'

4 years agoParameter type and name fixes in ext/standard
Máté Kocsis [Sat, 24 Oct 2020 12:15:07 +0000 (14:15 +0200)]
Parameter type and name fixes in ext/standard

Closes GH-6382

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Tue, 27 Oct 2020 09:59:53 +0000 (12:59 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed support for typed references

4 years agoFixed support for typed references
Dmitry Stogov [Tue, 27 Oct 2020 09:59:35 +0000 (12:59 +0300)]
Fixed support for typed references

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Tue, 27 Oct 2020 09:35:54 +0000 (10:35 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Skip bug46024.phpt under asan

4 years agoSkip bug46024.phpt under asan
Nikita Popov [Tue, 27 Oct 2020 09:33:59 +0000 (10:33 +0100)]
Skip bug46024.phpt under asan

There is a legitimate leak here, but I don't think it's worthwhile
to fix it. It involves a process terminated while printing phpinfo.

4 years agoUTF-32 conversion treats truncated characters as illegal
Alex Dowad [Wed, 14 Oct 2020 11:01:25 +0000 (13:01 +0200)]
UTF-32 conversion treats truncated characters as illegal

4 years agoAdd identify filter for UTF-32{,BE,LE}
Alex Dowad [Sun, 6 Sep 2020 12:42:55 +0000 (14:42 +0200)]
Add identify filter for UTF-32{,BE,LE}

4 years agoImprove error handling for UTF-16{,BE,LE}
Alex Dowad [Wed, 14 Oct 2020 18:25:19 +0000 (20:25 +0200)]
Improve error handling for UTF-16{,BE,LE}

Catch various errors such as the first part of a surrogate pair not being
followed by a proper second part, the first part of a surrogate pair appearing
at the end of a string, the second part of a surrogate pair appearing out
of place, and so on.

4 years agoUTF-16 text conversion handles truncated characters as illegal
Alex Dowad [Tue, 13 Oct 2020 13:17:00 +0000 (15:17 +0200)]
UTF-16 text conversion handles truncated characters as illegal

This broke one old test (Zend/tests/multibyte_encoding_003.phpt), which used
a PHP script encoded as UTF-16. The problem was that to terminate the test
script, we need the text: "\n--EXPECT--". Out of that text, the terminating
newline (0x0A byte) becomes part of the resulting test script; but a bare
0x0A byte with no 0x00 is not valid UTF-16.

Since we now treat truncated UTF-16 characters as erroneous, an extra '?' is
appended to the output as an 'illegal character' marker.

Really, if we are running PHP scripts which are treated as encoded in UTF-16
or some other arbitrary text encoding (not ASCII), and the script is not
actually a valid string in that encoding, inserting '?' characters into the
code which the PHP interpreter runs is a bad thing to do. In such cases, the
script shouldn't be treated as UTF-16 (or whatever) at all.

I wonder if mbstring's encoding detection is being used in 'non-strict' mode?

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Tue, 27 Oct 2020 07:31:09 +0000 (10:31 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed tracing JIT for tests/classes/unset_properties.phpt

4 years agoFixed tracing JIT for tests/classes/unset_properties.phpt
Dmitry Stogov [Tue, 27 Oct 2020 07:30:38 +0000 (10:30 +0300)]
Fixed tracing JIT for tests/classes/unset_properties.phpt

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Mon, 26 Oct 2020 22:20:46 +0000 (01:20 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed memory leak

4 years agoFixed memory leak
Dmitry Stogov [Mon, 26 Oct 2020 22:20:22 +0000 (01:20 +0300)]
Fixed memory leak

4 years agoMerge branch 'PHP-8.0'
Sammy Kaye Powers [Mon, 26 Oct 2020 22:15:45 +0000 (15:15 -0700)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Add missing observer tests

4 years agoAdd missing observer tests
Sammy Kaye Powers [Fri, 23 Oct 2020 20:38:42 +0000 (13:38 -0700)]
Add missing observer tests

Closes GH-6378

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Mon, 26 Oct 2020 18:49:14 +0000 (21:49 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed register allocation
  Fixed MAY_BE_INDIRECT inference.

4 years agoFixed register allocation
Dmitry Stogov [Mon, 26 Oct 2020 18:48:47 +0000 (21:48 +0300)]
Fixed register allocation

4 years agoFixed MAY_BE_INDIRECT inference.
Dmitry Stogov [Mon, 26 Oct 2020 18:48:13 +0000 (21:48 +0300)]
Fixed MAY_BE_INDIRECT inference.