Commit Graph

61722 Commits

Author SHA1 Message Date
Derick Rethans
a690a56a86 Merge branch 'PHP-8.1' 2022-04-22 10:31:22 +01:00
Derick Rethans
15ee285f83 Merge branch 'PHP-8.0' into PHP-8.1 2022-04-22 10:31:14 +01:00
Derick Rethans
c854bb2472 Fixed GH-8400: bug73837.phpt makes no sense
Replaces the indeed silly test with something that actually does the job,
albeit much slower.
2022-04-22 10:29:37 +01:00
Ilija Tovilo
4dec645029
Merge branch 'PHP-8.1'
* PHP-8.1:
  Verify generated files are up to date in CI
2022-04-21 23:27:46 +02:00
Ilija Tovilo
cf70047351
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Verify generated files are up to date in CI
2022-04-21 23:27:29 +02:00
Michael Voříšek
36de002cc6
Verify generated files are up to date in CI
Closes GH-8295
2022-04-21 23:25:47 +02:00
Ilija Tovilo
3b4eaf67ec
Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix preloading of constants containing enums
2022-04-21 11:59:15 +02:00
Ilija Tovilo
4397811db2
Fix preloading of constants containing enums
Fixes GH-8133
2022-04-21 11:57:12 +02:00
Christoph M. Becker
dad5cb442d
Fix GH-8408: bug68547.phpt fails without multibyte support 2022-04-20 16:42:09 +02:00
Dmitry Stogov
dc374a0b22 Merge branch 'PHP-8.1'
* PHP-8.1:
  JIT: Fixed incorrect guard
2022-04-18 11:35:08 +03:00
Dmitry Stogov
c3a30544ad JIT: Fixed incorrect guard
Fixes oss-fuzz #46704
2022-04-18 11:34:18 +03:00
Dmitry Stogov
6ed3b57e67 Fix incorrect constant propagation for VERIFY_RETURN_TYPE
Fixes oss-fuzz #46616
2022-04-18 10:33:52 +03:00
Alex Dowad
3f12d26e3a Merge branch 'PHP-8.1'
* PHP-8.1:
  Error handling for UTF-8 complies with WHATWG specification
2022-04-16 20:32:12 +02:00
Alex Dowad
04e59c916f Error handling for UTF-8 complies with WHATWG specification
In 7502c86342, I adjusted the number of error markers emitted on
invalid UTF-8 text to be more consistent with mbstring's behavior on
other text encodings (generally, it emits one error marker for one
unexpected byte). I didn't expect that anybody would actually care one
way or the other, but felt that it was better to be consistent than
not.

Later, Martin Auswöger kindly pointed out that the WHATWG encoding
specification, which governs how various text encodings are handled
by web browsers, does actually specify how many error markers should
be generated for any given piece of invalid UTF-8 text.

Until now, we have never really paid much attention to the WHATWG
specification, but we do want to comply with as many relevant
specifications as possible. And since PHP is commonly used for web
applications, compatibility with the behavior of web browsers is
obviously a good thing.
2022-04-16 15:04:38 +02:00
Nikita Popov
d16d251e20 Move MAY_BE_REF check into COPY_SSA_OBJ_TYPE
ZEND_ASSIGN is not the only place where this is relevant, so
handle it generically inside COPY_SSA_OBJ_TYPE instead.
2022-04-15 23:14:04 +02:00
Nikita Popov
5d072578cd Don't use CE for by-ref arguments 2022-04-15 23:00:43 +02:00
Nikita Popov
41f33b9dc3 Don't use CE info from pi node for MAY_BE_REF var
Once again, the actual class type may be reassigned indirectly.
2022-04-15 22:36:13 +02:00
Nikita Popov
b08aac0451 Fix inference for assignment of known object to reference
We cannot retain the ce information in that case, we have to
assume the ce may change indirectly through the reference.

Fixes oss-fuzz #46720.
2022-04-15 22:14:44 +02:00
Christoph M. Becker
3de0ccfe09
Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix GH-8366: ArrayIterator may leak when calling __construct()
2022-04-15 19:10:29 +02:00
Christoph M. Becker
549cf3a24d
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-8366: ArrayIterator may leak when calling __construct()
2022-04-15 19:08:28 +02:00
Christoph M. Becker
1762a87932
Fix GH-8366: ArrayIterator may leak when calling __construct()
When we detach an iterator, we also have to delete it.

Closes GH-8374.
2022-04-15 19:05:18 +02:00
Anatol Belski
8de75fa754 fileinfo: Re-add Apple flag
It is not supported for all kinds of data, but it is definitely usable.

Signed-off-by: Anatol Belski <ab@php.net>
2022-04-15 14:44:50 +02:00
George Peter Banyard
8649cb8a96
Improve and fix stub return types (#8368) 2022-04-14 18:38:00 +01:00
Derick Rethans
731e3f6c96 Merge branch 'PHP-8.1' 2022-04-14 10:32:25 +01:00
Derick Rethans
ec0771c03f Merge branch 'PHP-8.0' into PHP-8.1 2022-04-14 10:32:21 +01:00
Derick Rethans
e38d300a70 Refactor code to avoid duplication 2022-04-14 10:32:10 +01:00
Cody Mann
24085d0192 style/readability updates 2022-04-14 10:22:00 +01:00
Cody Mann
287c8a86b4 GH-7979: iterator advances when checking if valid 2022-04-14 10:22:00 +01:00
George Peter Banyard
cfc38a6014
SPL: minor refactoring (#8341)
Use more appropriate types and return macros
2022-04-13 20:34:23 +01:00
Christoph M. Becker
8233e06109
Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix openssl_csr_export() stub
2022-04-13 15:23:41 +02:00
Christoph M. Becker
c821886777
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix openssl_csr_export() stub
2022-04-13 15:23:09 +02:00
Mikko Pesari
16bf8331e0
Fix openssl_csr_export() stub
Closes GH-8362.
2022-04-13 15:20:58 +02:00
Christoph M. Becker
4d24ac3cb0
Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix `--EXTENSIONS--` section for two tests in ext/zend_test
2022-04-13 14:47:34 +02:00
Christoph M. Becker
11231837d7
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix `--EXTENSIONS--` section for two tests in ext/zend_test
2022-04-13 14:46:56 +02:00
Tim Düsterhus
5655f1abe3
Fix --EXTENSIONS-- section for two tests in ext/zend_test
The extension name got broken in e6cf583160.

Closes GH-8357.
2022-04-13 14:45:52 +02:00
George Peter Banyard
7710f9946b Fix generation of arginfo if type is just null 2022-04-11 16:58:13 +01:00
George Peter Banyard
7daa8b77a6 BZ2: Use EMPTY_SWITCH_DEFAULT_CASE
This adds an assertion that this case indeed never happens
2022-04-11 16:58:13 +01:00
bohwaz
2973b9f02a
Allow user to change SQLITE_DEFENSIVE if needed
Closes GH-8200.
2022-04-11 17:08:48 +02:00
George Peter Banyard
8dbfb15f7c Use more specific return types in SPL 2022-04-11 14:04:37 +01:00
Christoph M. Becker
30b2398860
Merge branch 'PHP-8.1'
* PHP-8.1:
  Preserve file-position when php://temp switches to temporary file
2022-04-11 12:45:48 +02:00
Christoph M. Becker
e3a5e424f6
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Preserve file-position when php://temp switches to temporary file
2022-04-11 12:44:56 +02:00
Bernd Holzmüller
84c18f9f04
Preserve file-position when php://temp switches to temporary file
Closes GH-8333.
2022-04-11 12:31:22 +02:00
Dmitry Stogov
106c908db5 Merge branch 'PHP-8.1'
* PHP-8.1:
  JIT: Fix memory lek
2022-04-11 12:21:09 +03:00
Dmitry Stogov
8633893330 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fix memory lek
2022-04-11 12:21:02 +03:00
Dmitry Stogov
3aaf2f6f89 JIT: Fix memory lek
Fixes oss-fuzz #46462
2022-04-11 12:17:05 +03:00
Dmitry Stogov
ccef2bc435 Merge branch 'PHP-8.1'
* PHP-8.1:
  Tracing JIT: Fixed incorrect assumption about stack slot type
2022-04-11 11:45:32 +03:00
Dmitry Stogov
69bcd93190 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Tracing JIT: Fixed incorrect assumption about stack slot type
2022-04-11 11:42:56 +03:00
Dmitry Stogov
5b048dd05c Tracing JIT: Fixed incorrect assumption about stack slot type
Fixes oss-fuzz #46404
2022-04-11 11:42:01 +03:00
Nikita Popov
414f7fc2bb Merge branch 'PHP-8.1'
* PHP-8.1:
  Improve type narrowing fix
2022-04-10 11:22:52 +02:00
Nikita Popov
c72e9621ce Improve type narrowing fix
We need to explicitly model the null return type for property
accesses on non-objects.
2022-04-10 11:22:36 +02:00