1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 10:43:30 +02:00
Commit Graph

4507 Commits

Author SHA1 Message Date
Dmitry Stogov 68381457cc Fix test failures when PHP is compiled without ZEND_CHECK_STACK_LIMIT
(e.g. 32-bit CLANG build with address sanitizer)
2023-01-24 09:55:47 +03:00
Máté Kocsis 7936c8085e Fix GH-8329 Print true/false instead of bool in error and debug messages (#8385) 2023-01-23 10:52:14 +01:00
Bob Weinand f833a7ea59 Merge branch 'PHP-8.2' 2023-01-17 11:14:18 +01:00
Bob Weinand a6a20c9e17 Add regression test for e560592a61
Reproduces only under ASAN.

Signed-off-by: Bob Weinand <bobwei9@hotmail.com>
2023-01-17 11:14:00 +01:00
Arnaud Le Blanc ba091ab3c7 Merge branch 'PHP-8.2'
* PHP-8.2:
  [ci skip] NEWS
  Reduce HT_MAX_SIZE to account for the max load factor of 0.5 (#10242)
  GC fiber unfinished executions (#9810)
2023-01-13 12:31:12 +01:00
Arnaud Le Blanc d89408075f Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Reduce HT_MAX_SIZE to account for the max load factor of 0.5 (#10242)
  GC fiber unfinished executions (#9810)
2023-01-13 12:28:21 +01:00
Arnaud Le Blanc 4fb149390a GC fiber unfinished executions (#9810) 2023-01-13 12:04:28 +01:00
David Carlier 41c0304647 Merge branch 'PHP-8.2' 2023-01-12 22:01:39 +00:00
David Carlier 884e8a970a Merge branch 'PHP-8.1' into PHP-8.2 2023-01-12 22:01:30 +00:00
Niels Dossche 833b45ac44 Fix GH-10249: Assertion `size >= page_size + 1 * page_size' failed.
Co-authored-by: Changochen <changochen1@gmail.com>

Closes GH-10284
2023-01-12 22:00:00 +00:00
Christoph M. Becker 60102c3228 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix recently introduced gh10251.phpt
2023-01-08 18:28:34 +01:00
Christoph M. Becker 6faeb9571d Fix recently introduced gh10251.phpt
As of PHP 8.2.0, creation of dynamic properties is deprecated, so we
slap a `AllowDynamicProperties` attribute on the class.
2023-01-08 18:07:21 +01:00
George Peter Banyard 3b8327a4e3 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix GH-10251: Assertion `(flag & (1<<3)) == 0' failed.
  Fix GH-9710: phpdbg memory leaks by option "-h"
2023-01-08 16:12:21 +00:00
George Peter Banyard e308dc0635 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-10251: Assertion `(flag & (1<<3)) == 0' failed.
  Fix GH-9710: phpdbg memory leaks by option "-h"
2023-01-08 16:11:46 +00:00
Niels Dossche d03025bf59 Fix GH-10251: Assertion `(flag & (1<<3)) == 0' failed.
zend_get_property_guard previously assumed that at least "str" has a
pre-computed hash. This is not always the case, for example when a
string is created by bitwise operations, its hash is not set. Instead of
forcing a computation of the hashes, drop the hash comparison.

Closes GH-10254

Co-authored-by: Changochen <changochen1@gmail.com>

Signed-off-by: George Peter Banyard <girgias@php.net>
2023-01-08 16:09:59 +00:00
George Peter Banyard 1b3e1755af Merge branch 'PHP-8.2'
* PHP-8.2:
  Move test for GH-10200 to the simplexml extension test directory
2023-01-07 03:08:13 +00:00
Niels Dossche df96346f9c Move test for GH-10200 to the simplexml extension test directory
Closes GH-10252

Signed-off-by: George Peter Banyard <girgias@php.net>
2023-01-07 03:07:37 +00:00
George Peter Banyard 5033f6fcaa Merge branch 'PHP-8.2'
* PHP-8.2:
  Add missing EXTENSIONS section to test file gh10200
2023-01-05 13:10:49 +00:00
George Peter Banyard de633c31dd Add missing EXTENSIONS section to test file gh10200 2023-01-05 13:10:28 +00:00
Niels Dossche a3d2c33b06 Fix GH-10200: zif_get_object_vars: Assertion `!(((__ht)->u.flags & (1<<2)) != 0)' failed.
This occurs because the array of properties is a single element with an
integer key, not an associative array. Therefore it is a packed array
and thus the assumption the iteration macro makes is invalid.

This restores the behaviour of PHP<8.2.

Closes GH-10209

Co-authored-by: Deltik <deltik@gmx.com>

Signed-off-by: George Peter Banyard <girgias@php.net>
2023-01-02 15:48:19 +00:00
Niels Dossche c2404915e0 Fix GH-10200: zif_get_object_vars: Assertion `!(((__ht)->u.flags & (1<<2)) != 0)' failed.
This occurs because the array of properties is a single element with an
integer key, not an associative array. Therefore it is a packed array
and thus the assumption the iteration macro makes is invalid.

This restores the behaviour of PHP<8.2.

Closes GH-10209

Co-authored-by: Deltik <deltik@gmx.com>

Signed-off-by: George Peter Banyard <girgias@php.net>
2023-01-02 15:46:58 +00:00
Derick Rethans 02a5335b71 Merge branch 'PHP-8.2' 2022-12-23 16:36:48 +00:00
Derick Rethans 9529b8919f Merge branch 'PHP-8.1' into PHP-8.2 2022-12-23 16:36:40 +00:00
George Peter Banyard 44add3c791 Add secondary test that registers a trampoline as a shutdown function 2022-12-23 16:34:57 +00:00
Derick Rethans b489e0f2b8 Make sure to disable JIT when overriding execute_ex 2022-12-23 16:34:57 +00:00
Derick Rethans 233ffccc35 Fix GH-10072: PHP crashes when execute_ex is overridden and a __call trampoline is used from internal code 2022-12-23 16:34:57 +00:00
Remi Collet 319de301be Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix #10133 set variables_order en ensure $ENV is set
2022-12-20 16:41:07 +01:00
Remi Collet bfa56cf62b Fix #10133 set variables_order en ensure $ENV is set 2022-12-20 16:40:47 +01:00
Arnaud Le Blanc cf77762970 Skip tests under MSAN
Stack overflows can be detected as long as C stack frames between two
execute_ex() calls use less than zend.reserved_stack_size bytes of stack.

The default value of zend.reserved_stack_size accounts for the largest stack
users, but MSAN instrumentation increases usage considerably: php_pcre2_match
uses more than 200KiB of stack in some MSAN build, compared to 20KiB without MSAN
according to -fstack-usage.
2022-12-19 21:41:48 +01:00
Dmitry Stogov 7b6e31e9b5 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix memory leak
2022-12-19 12:12:05 +03:00
Dmitry Stogov f763cfd3d5 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix memory leak
2022-12-19 12:11:55 +03:00
Dmitry Stogov 683285165e Fix memory leak
Fixes oss-fuzz #54320
2022-12-19 12:11:16 +03:00
Arnaud Le Blanc a11c8a3039 Limit stack size (#9104) 2022-12-16 17:44:26 +01:00
Christoph M. Becker 9f0e4a55e7 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix GH-9769: Misleading error message for unpacking of objects
2022-12-02 13:12:14 +01:00
Christoph M. Becker 6b1f4c5a44 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-9769: Misleading error message for unpacking of objects
2022-12-02 13:11:51 +01:00
蝦米 93592ea743 Fix GH-9769: Misleading error message for unpacking of objects
Only arrays can be unpacked in constant expressions.

Closes GH-9776.
2022-12-02 13:10:59 +01:00
Ilija Tovilo 683d81e4bd Fix incorrect short-circuiting in constant expressions (#10030)
Fixes GH-10014
2022-12-01 19:30:44 +01:00
Ilija Tovilo adfdfb2e1e Improvements in modifier parsing (#9926)
Use a shared non-terminal for all class modifiers. This avoids conflicts when
adding modifiers that are only valid for certain targets. This change is
necessary for asymmetric visibility but might be useful for other future
additions.

Closes GH-9926
2022-11-17 16:20:27 +01:00
Ilija Tovilo 8731fb2d09 Fix caching of default params with side-effects
Fixes GH-9965
Closes GH-9935
2022-11-17 11:52:12 +01:00
Tim Düsterhus dd8de1e726 Promote unserialize() notices to warning (#9629)
* Unserialize: Migrate "Unexpected end of serialized data" to E_WARNING

* Unserialize: Migrate "Error at offset %d of %d bytes" to E_WARNING

* Unserialize: Migrate "%s is returned from __sleep() multiple times" to E_WARNING

* Add NEWS for “Promote unserialize() notices to warning”
2022-11-15 19:36:38 +01:00
Dmitry Stogov 08f9b50a9c Merge branch 'PHP-8.2'
* PHP-8.2:
  Don't check "fake" closures (fix assertion)
2022-11-07 12:21:03 +03:00
Dmitry Stogov 05b63b1593 Don't check "fake" closures (fix assertion)
Fixes oss-fuzz #53078
2022-11-07 12:19:54 +03:00
Arnaud Le Blanc 02ed12240e Merge branch 'PHP-8.2'
* PHP-8.2:
  [ci skip] NEWS
  [ci skip] NEWS
  [ci skip] NEWS
  Fix generator memory leaks when interrupted during argument evaluation (#9756)
2022-11-04 16:06:42 +01:00
Arnaud Le Blanc 34a85fbea0 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [ci skip] NEWS
  [ci skip] NEWS
  Fix generator memory leaks when interrupted during argument evaluation (#9756)
2022-11-04 16:02:04 +01:00
Arnaud Le Blanc 4011657719 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  [ci skip] NEWS
  Fix generator memory leaks when interrupted during argument evaluation (#9756)
2022-11-04 15:59:14 +01:00
Arnaud Le Blanc 5d1f3e047c Fix generator memory leaks when interrupted during argument evaluation (#9756) 2022-11-04 15:55:55 +01:00
Ilija Tovilo a9231e7fb2 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix fake closure leaking when called from internal func
2022-11-03 14:32:22 +01:00
Ilija Tovilo cc9dddea38 Fix fake closure leaking when called from internal func
Introduced in 8e49d7f32f.

ZEND_CALL_RELEASE_THIS was previously not handled for internal calls but
just for user calls in the zend_leave_helper.

Closes GH-9884
2022-11-03 14:31:47 +01:00
Dmitry Stogov fd6d2ccfcb Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix memory leak
2022-10-31 12:22:40 +03:00
Dmitry Stogov 482ae71fda Fix memory leak 2022-10-31 12:20:28 +03:00