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

131137 Commits

Author SHA1 Message Date
Ilija Tovilo fb670f2b80 Move setting of CG(zend_lineno)
This way it will also work for zend_ast_create_zval
2023-02-02 19:55:23 +01:00
Ilija Tovilo 848a6e5035 Fix incorrect line number of constant in constant expression
Fixes GH-10356
2023-02-02 19:51:54 +01:00
Ilija Tovilo 35a36b13e5 Fix comp-time and constant evaluation of dynamic class constant fetch
Fixes GH-10486
Fixes oss-fuzz #55436
Fixes oss-fuzz #55472
Closes GH-10487
2023-02-02 19:18:17 +01:00
Ilija Tovilo f291d37a1a Allow comments between intersection types and by-ref params
Fixes GH-10083
Closes GH-10125
2023-02-02 19:07:10 +01:00
Ilija Tovilo 9e097822e8 Fix lineno for all constant expressions
Fixes GH-8821
Closes GH-8855
2023-02-02 19:03:47 +01:00
Ilija Tovilo c8cc355070 Merge branch 'PHP-8.2' 2023-02-02 18:59:49 +01:00
Ilija Tovilo 9f966183eb Merge branch 'PHP-8.1' into PHP-8.2 2023-02-02 18:59:20 +01:00
Max Kellermann f7e678476f .github/workflows/push.yml: enable ccache
This reduces the LINUX_X64_RELEASE_ZTS build time from 9-10 minutes to
less than 3 minutes.

Closes GH-10395
2023-02-02 18:58:30 +01:00
Danack 21cab65c00 Ignore generated file on arm64. 2023-02-02 12:20:20 +00:00
George Peter Banyard 64127b66c6 Concatenating two valid UTF-8 strings produces a valid UTF-8 string
The UTF-8 valid flag needs to be copied upon interning,
otherwise strings that are concatenated at compile time lose this information.

However, if previously this string was interned without the flag it is not added
E.g. in the case the string is an existing class name.

Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
2023-02-02 12:02:36 +00:00
George Peter Banyard 78720e39a6 Mark numeric strings as valid UTF-8 2023-02-02 12:02:36 +00:00
George Peter Banyard 0c9181b646 Add function in zend_test to check UTF8 flag is added
Also add test to check what strings are marked as having the flag
2023-02-02 12:02:36 +00:00
George Peter Banyard 0b9fb636d1 Add macro to check zend_string is marked as valid UTF-8 2023-02-02 12:02:36 +00:00
Derick Rethans 8d5953c002 Merge branch 'PHP-8.2' 2023-01-31 13:00:13 +00:00
Derick Rethans cb907d50a8 Merge branch 'PHP-8.1' into PHP-8.2 2023-01-31 13:00:06 +00:00
Derick Rethans d17175cb08 Merge remote-tracking branch 'derickr/GH-10447-p-format-specifier' into PHP-8.1 2023-01-31 12:59:39 +00:00
Derick Rethans a42bf93308 Fixed GH-10447: 'p' format specifier does not yield 'Z' for 00:00 2023-01-31 12:58:21 +00:00
Derick Rethans 71766d78b7 Merge branch 'PHP-8.2' 2023-01-31 12:55:30 +00:00
Derick Rethans 322425eb5b Merge remote-tracking branch 'derickr/GH-10152-serialise-datetime' into PHP-8.2 2023-01-31 12:54:00 +00:00
Derick Rethans 85fbc6eaa6 Fix GH-10152: Custom properties of Date's child classes are not serialised 2023-01-31 12:53:03 +00:00
George Peter Banyard 735edd1c17 Voidify php_sock_array_from_fd_set() as result is never used 2023-01-30 16:05:30 +00:00
George Peter Banyard 3eb9dd47e0 Use bool and zend_result where it makes sense in sockets extension 2023-01-30 16:05:30 +00:00
Bob Weinand 8076ca2bcf Merge branch 'PHP-8.2' 2023-01-30 12:33:23 +01:00
Bob Weinand f732486c08 Merge branch 'PHP-8.1' into PHP-8.2 2023-01-30 12:33:06 +01:00
Bob Weinand 00be6e1aed Look at executing generator for fiber destructor behaviour 2023-01-30 12:32:53 +01:00
Bob Weinand 1679235f0f Merge branch 'PHP-8.2' 2023-01-30 12:13:52 +01:00
Bob Weinand e746b89bc9 Merge branch 'PHP-8.1' into PHP-8.2 2023-01-30 12:13:41 +01:00
Bob Weinand b9bca2dadb Fix resetting ZEND_GENERATOR_IN_FIBER flag
Signed-off-by: Bob Weinand <bobwei9@hotmail.com>
2023-01-30 12:13:07 +01:00
Dmitry Stogov ea37abd412 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix type inference
2023-01-30 13:16:17 +03:00
Dmitry Stogov 55e3f73109 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix type inference
2023-01-30 13:16:05 +03:00
Dmitry Stogov 81607a62ca Fix type inference
Fixes oss-fuzz #55358
2023-01-30 13:15:05 +03:00
David Carlier 908d954de0 sockets updlite protocol support, with checksum coverage settings.
Close GH-10468
2023-01-29 18:19:54 +00:00
George Peter Banyard 231ffaf394 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix incorrect check in phar tar parsing
2023-01-29 17:17:32 +00:00
George Peter Banyard 08f654b590 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix incorrect check in phar tar parsing
2023-01-29 17:17:21 +00:00
Niels Dossche ec4939b170 Fix incorrect check in phar tar parsing
The entry.flags was used to check whether the entry has the directory
flag. The flags however were masked to only contain the permissions. We
need to check the mode, before the permission masking, instead of the
flags to check whether it is a directory.

Closes GH-10464

Signed-off-by: George Peter Banyard <girgias@php.net>
2023-01-29 17:14:12 +00:00
Aaron Piotrowski ff84598055 Merge branch 'PHP-8.2'
* PHP-8.2:
  [ci skip] NEWS
  Fix GH-10437: Set active fiber to null on bailout (#10443)
2023-01-28 10:18:51 -06:00
Aaron Piotrowski 5e1b9666a9 [ci skip] NEWS 2023-01-28 10:18:12 -06:00
Aaron Piotrowski 0c4aee464a Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-10437: Set active fiber to null on bailout (#10443)
2023-01-28 10:16:04 -06:00
Aaron Piotrowski 284c29328e Fix GH-10437: Set active fiber to null on bailout (#10443) 2023-01-28 10:13:58 -06:00
Arnaud Le Blanc 306a72add4 Add test for GH-10405 2023-01-28 11:49:14 +01:00
Niels Dossche dc6fbec037 Fix missing zend_shared_alloc_unlock() (#10405)
This code was refactored and the unlock was forgotten.
The following assertion is triggered in debug mode:
  zend_shared_alloc_lock: Assertion `!(accel_globals.locked)' failed.
And in release mode this likely deadlocks.
Fix this by re-adding the unlock.
2023-01-28 11:48:46 +01:00
Arnaud Le Blanc 479b47c6f0 Merge branch 'PHP-8.2'
* PHP-8.2:
  [ci skip] NEWS
  [ci skip] NEWS
  Fix overflow check in OnUpdateMemoryConsumption (#10456)
  Prevent dtor of generator in suspended fiber (#10462)
2023-01-27 19:40:16 +01:00
Arnaud Le Blanc cfb6e82cbd [ci skip] NEWS 2023-01-27 19:37:27 +01:00
Arnaud Le Blanc 6c22dea3c1 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [ci skip] NEWS
  Fix overflow check in OnUpdateMemoryConsumption (#10456)
  Prevent dtor of generator in suspended fiber (#10462)
2023-01-27 19:37:01 +01:00
Arnaud Le Blanc a24ac59e55 [ci skip] NEWS 2023-01-27 19:36:28 +01:00
Niels Dossche d7de73b551 Fix overflow check in OnUpdateMemoryConsumption (#10456)
memsize is a signed long, therefore the check against the
(*un*signed long maximum) / 1024² will allow too large values. This check worked
correctly in d4b3f89c53 where it checked against the maximum signed
value, but was broken in 003346c450. Fix it by changing ZEND_ULONG_MAX
to ZEND_LONG_MAX.
2023-01-27 19:33:58 +01:00
Arnaud Le Blanc 1173c2e64a Prevent dtor of generator in suspended fiber (#10462)
Generators that suspended a fiber should not be dtor because they will be
executed during the fiber dtor.

Fiber dtor throws an exception in the fiber's context in order to unwind and
execute finally blocks, which will also properly dtor the generator.

Fixes GH-9916
2023-01-27 19:32:25 +01:00
Arnaud Le Blanc ebf26af71a Merge branch 'PHP-8.2'
* PHP-8.2:
  Handle non-INDIRECT symbol table entries in zend_fiber_object_gc() (#10386)
2023-01-27 10:55:40 +01:00
Arnaud Le Blanc ab2097df48 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Handle non-INDIRECT symbol table entries in zend_fiber_object_gc() (#10386)
2023-01-27 10:55:30 +01:00
Arnaud Le Blanc 9830204213 Handle non-INDIRECT symbol table entries in zend_fiber_object_gc() (#10386)
Fixes GH-10340
2023-01-27 10:52:42 +01:00