1
0
mirror of https://github.com/php/php-src.git synced 2026-03-29 11:42:17 +02:00
Commit Graph

127952 Commits

Author SHA1 Message Date
George Peter Banyard
2fe35cf807 Regenerate optimized func infos
Using the --generate-optimizer-info option for ./build/gen_stubs.php
2022-04-05 13:36:14 +01:00
Christoph M. Becker
012ef7912a Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix #81714: segfault when serializing finalized HashContext
2022-04-05 13:36:50 +02: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
ee34c298f0 Merge branch 'PHP-8.1'
* PHP-8.1:
  Mark ext/mysqli properties as readonly for documentation purposes
2022-04-05 13:24:51 +02:00
Máté Kocsis
2b4fee03af Mark ext/mysqli properties as readonly for documentation purposes 2022-04-05 13:24:21 +02:00
Christoph M. Becker
22c80e48bb Merge branch 'PHP-8.1'
* PHP-8.1:
  Bump version
  JIT: Fix array clobbering by user error handler
2022-04-05 13:21:32 +02:00
Christoph M. Becker
60fdca5419 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Bump version
2022-04-05 13:20:19 +02:00
Christoph M. Becker
43f3745abb Bump version
Apparently, this has been forgotten when PHP 8.0.17RC1 and 8.0.18RC1
had been tagged.

We also fix the version of the fix for GH-8253, which didn't make it
into PHP 8.0.18RC1.
2022-04-05 13:19:02 +02:00
Dmitry Stogov
df0c8aaee9 JIT: Fix array clobbering by user error handler
Fixes oss-fuzz #46336
2022-04-04 16:47:47 +03:00
Paragon Initiative Enterprises
afd8f84c1a Add sodium_crypto_stream_xchacha20_xor_ic()
There are many use-cases where a PHP user is currently using sodium_compat's implementation of this low-level XChaCha20 API. For example, multi-part message processing (in low-memory settings) for a ciphertext that was encrypted with XChaCha20-Poly1305 (rather than the secretstream API).

Adding this function to ext/sodium offers better performance and lowers users' memory usage with the polyfill, and ensures that users coming from other languages that provide libsodium bindings have a more consistent experience with our bindings. This is a win-win.

This patch follows the libsodium precedent of adding functions instead of optional parameters to existing functions. The parameter order is also consistent with the C API.

https://doc.libsodium.org/advanced/stream_ciphers/xchacha20#usage

Closes GH-8276.
2022-04-04 15:43:42 +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
d260e063a8 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fixed reference counting inference
2022-04-04 15:34:57 +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
Bob Weinand
ceda8a8c41 Merge branch 'PHP-8.1' 2022-04-04 14:25:42 +02:00
Bob Weinand
e0025562d0 Merge branch 'PHP-8.0' into PHP-8.1 2022-04-04 14:25:23 +02:00
Bob Weinand
9cb512ecc1 Ensure correct target opline for exceptions thrown during yield from
Also appends the exception during a yield from values dtor instead of prepending it

Fixing regression introduced in 13649451c2.
2022-04-04 14:24:39 +02:00
Dmitry Stogov
db34e2a68e Merge branch 'PHP-8.1'
* PHP-8.1:
  Trcing JIT: remove unchecked type guards om ROPE_* instructions
2022-04-04 15:08:01 +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
6156505697 Merge branch 'PHP-8.1'
* PHP-8.1:
  JIT: Fixed incorrect code generation
2022-04-04 14:24:32 +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
Dmitry Stogov
2ab05da975 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix arsort() crash on recursion
2022-04-04 12:04:21 +03:00
Dmitry Stogov
14fddd17df Fix arsort() crash on recursion
Fixes oss-fuzz #46315
2022-04-04 12:03:39 +03:00
David Carlier
2874e5fa05 FPM: Emit error for invalid port setting 2022-04-03 21:24:46 +01:00
Max Kellermann
8620788c2a Zend/zend_execute: remove duplicate deinitialization code
This code duplication was introduced by commit 85f35a8fc1 ("Separate
unspecializeble code of INCLIDE_OR_EVAL into helper functions") for no
obvious reason.
2022-04-02 17:42:49 +02:00
Christoph M. Becker
53c6619bda Restore memory_reset_peak_usage() declaration
Cf. <https://github.com/php/php-src/pull/8151/files#r819605725>.
2022-04-01 18:13:22 +02:00
Bob Weinand
703763f43b Merge branch 'PHP-8.1' 2022-04-01 17:51:43 +02:00
Bob Weinand
e4c7ffc152 Fix deprecated warning in new gh8289.phpt test 2022-04-01 17:51:18 +02:00
Bob Weinand
914c1ba1e7 Merge branch 'PHP-8.1' 2022-04-01 17:38:56 +02:00
Bob Weinand
16dcededa8 Merge branch 'PHP-8.0' into PHP-8.1 2022-04-01 17:38:10 +02:00
Bob Weinand
13649451c2 Fix GH-8289: Exceptions thrown within a yielded from iterator are not rethrown into the generator
This also fixes the fact that exception traces were not including the generator frame when thrown in a yielded from iterator.
2022-04-01 17:32:48 +02:00
George Peter Banyard
083b64efb5 Add missing #endif in stubs
This slipped away during the rebase of 5171cb435a
2022-04-01 16:26:38 +01:00
George Peter Banyard
5171cb435a Fix [-Wundef] warnings in standard extension 2022-04-01 15:48:41 +01:00
George Peter Banyard
62ab9293ae Fix [-Wundef] warnings in SNMP extension 2022-04-01 15:45:44 +01:00
George Peter Banyard
2c2ecba063 Determine value of ZEND_MM_* during config and fix sign conversion (#6981)
Also add a new ZEND_MM_NEED_EIGHT_BYTE_REALIGNMENT definition.

This fixes many [-Wsign-conversion] warnings.

Co-authored-by: Guillaume Charifi <guillaume.charifi@sfr.fr>
Co-authored-by: Bob Weinand <bobwei9@hotmail.com>
2022-04-01 15:43:42 +01:00
George Peter Banyard
738adce79f Fix [-Wundef] warnings in DBA extension 2022-04-01 14:38:44 +01:00
Derick Rethans
cd6c338c89 Merge branch 'PHP-8.1' 2022-04-01 13:28:13 +01:00
Derick Rethans
e6c4988187 Fixed #7752, #8101, #81660: DateTimeZone::getTransitions() returns insufficient data 2022-04-01 13:28:05 +01:00
Ilija Tovilo
c7875a68ee Merge branch 'PHP-8.1'
* PHP-8.1:
  Re-enable i386 tests on Azure Pipelines
2022-04-01 13:37:30 +02:00
Ilija Tovilo
7d6a3af7db Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Re-enable i386 tests on Azure Pipelines
2022-04-01 13:37:07 +02:00
Ilija Tovilo
d82d62c237 Re-enable i386 tests on Azure Pipelines 2022-04-01 12:55:31 +02:00
Patrick Allaert
2aceb0b00e Merge branch 'PHP-8.1' 2022-03-31 17:38:09 +02:00
Patrick Allaert
5a899563cc Bump for 8.1.6-dev 2022-03-31 17:37:41 +02:00
Max Kellermann
b9e895bca0 Replace memcmp() with zend_string functions (#8216)
* ext/oci8: use zend_string_equals()

Eliminate duplicate code.

* main/php_variables: use zend_string_equals_literal()

Eliminate duplicate code.

* Zend/zend_string: add zend_string_equals_cstr()

Allows eliminating duplicate code.

* Zend, ext/{opcache,standard}, main/output: use zend_string_equals_cstr()

Eliminate duplicate code.

* Zend/zend_string: add zend_string_starts_with()

* ext/{opcache,phar,spl,standard}: use zend_string_starts_with()

This adds missing length checks to several callers, e.g. in
cache_script_in_shared_memory().  This is important when the
zend_string is shorter than the string parameter, when memcmp()
happens to check backwards; this can result in an out-of-bounds memory
access.
2022-03-31 16:27:58 +02:00
Ilija Tovilo
54440fa6eb Merge branch 'PHP-8.1'
* PHP-8.1:
  Register JSON_ERROR_NON_BACKED_ENUM constant (#8285)
2022-03-31 14:31:43 +02: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
15129ab688 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix mnd_malloc -> mnd_emalloc from previous merge
2022-03-31 10:54:38 +01:00