George Peter Banyard
660ef91fbc
Fix GH-8273: SplFileObject: key() returns wrong value
2022-04-23 14:00:11 +01:00
Ilija Tovilo
82d3a831d2
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix GH-8421: Attributes that target functions are not valid for anonymous functions defined within a method
2022-04-23 11:19:20 +02:00
Ollie Read
d0f1b987a5
Fix GH-8421: Attributes that target functions are not valid for anonymous functions defined within a method
...
Closes GH-8424
2022-04-23 11:16:28 +02:00
Arnaud Le Blanc
f20e11cbe1
Clear recorded errors before executing shutdown functions
...
Recorded errors may be attached to the wrong cached script when a fatal error
occurs during recording. This happens because the fatal error will cause a
bailout, which may prevent the recorded errors from being freed. If an other
script is compiled after bailout, or if a class is linked after bailout, the
recorded errors will be attached to it.
This change fixes this by freeing recorded errors before executing shutdown
functions.
Fixes GH-8063
2022-04-22 18:14:08 +02: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
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
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
c3a30544ad
JIT: Fixed incorrect guard
...
Fixes oss-fuzz #46704
2022-04-18 11:34:18 +03: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
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
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
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
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
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
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
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
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
Christoph M. Becker
22f8886038
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix GH-8267: MySQLi uses unsupported format specifier on Windows
2022-04-07 17:06:20 +02:00
Christoph M. Becker
7c702b72f2
Fix GH-8267: MySQLi uses unsupported format specifier on Windows
...
Instead of using the unsupported `%I64u` and `%I64d` format specifiers
on Windows, we use the portable `PRIu64` and `PRId64` specifiers.
The `L64()` macro and the `my_longlong` typedef should be adapted as
well, as the `i64` literal suffix is still supported by MSVC, but using
`LL` or `ll` is recommended[1], and the standard `int64_t` is available
there anyway. This is not urgent, though.
[1] <https://docs.microsoft.com/en-us/cpp/cpp/numeric-boolean-and-pointer-literals-cpp?view=msvc-170#integer-literals >
Closes GH-8268.
2022-04-07 17:03:15 +02:00
Derick Rethans
7e829d1536
Updated to version 2022.1 (2022a)
2022-04-07 10:45:20 +01:00
Derick Rethans
7aefee1613
Updated to version 2022.1 (2022a)
2022-04-07 10:45:19 +01:00
Christoph M. Becker
187f5a362d
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix #81714 : segfault when serializing finalized HashContext
2022-04-05 13:36:07 +02:00
Christoph M. Becker
c2eafc29f5
Fix #81714 : segfault when serializing finalized HashContext
...
We must not allow to serialize already finalized `HashContext`s, since
the internal context is already freed. Since there is not much point
in serializing finalized `HashContext`s, we just bail out in that case.
Closes GH-8265.
2022-04-05 13:25:22 +02:00
Máté Kocsis
2b4fee03af
Mark ext/mysqli properties as readonly for documentation purposes
2022-04-05 13:24:21 +02:00
Dmitry Stogov
4f18dbeb97
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
JIT: Fix array clobbering by user error handler
2022-04-04 16:37:17 +03:00
Dmitry Stogov
c489e360a6
JIT: Fix array clobbering by user error handler
...
Fixes oss-fuzz #46336
2022-04-04 16:36:25 +03:00
Dmitry Stogov
e721a42211
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fixed reference counting inference
2022-04-04 15:34:46 +03:00
Dmitry Stogov
c0bb238483
Fixed reference counting inference
...
Fixes oss-fuzz #46084
2022-04-04 15:34:02 +03:00
Dmitry Stogov
33704be5f2
Trcing JIT: remove unchecked type guards om ROPE_* instructions
...
Fixes oss-fuzz #46209
2022-04-04 15:06:35 +03:00
Dmitry Stogov
24bb178310
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
JIT: Fixed incorrect code generation
2022-04-04 14:24:10 +03:00
Dmitry Stogov
0d44bbd212
JIT: Fixed incorrect code generation
...
Fixes oss-fuzz #46328
2022-04-04 14:20:45 +03:00
Derick Rethans
e6c4988187
Fixed #7752 , #8101 , #81660 : DateTimeZone::getTransitions() returns insufficient data
2022-04-01 13:28:05 +01:00
Ilija Tovilo
2145f80d4b
Register JSON_ERROR_NON_BACKED_ENUM constant ( #8285 )
...
Fixes GH-8238
2022-03-31 14:31:17 +02:00
Kamil Tekiela
ced5581eca
Fix mnd_malloc -> mnd_emalloc from previous merge
2022-03-31 10:53:58 +01:00