1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 09:28:21 +02:00
Commit Graph

125687 Commits

Author SHA1 Message Date
Remi Collet 4914ead292 Merge branch 'PHP-8.1'
* PHP-8.1:
  fix [-Wmaybe-uninitialized] build warnings
2021-09-10 15:58:12 +02:00
Remi Collet 6ee96f095a fix [-Wmaybe-uninitialized] build warnings 2021-09-10 15:57:56 +02:00
Nikita Popov 5355cf3394 Merge branch 'PHP-8.1'
* PHP-8.1:
  Check that POST_INC/DEC has use in DFA optimization
2021-09-09 15:50:10 +02:00
Nikita Popov f6daf83e75 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Check that POST_INC/DEC has use in DFA optimization
2021-09-09 15:50:04 +02:00
Nikita Popov 5cae6b9b0d Check that POST_INC/DEC has use in DFA optimization
We'd have usually converted it into a PRE_INC if there is no use,
but that's not guaranteed. If there is no use at this point, make
sure we don't try to use the sentinel value.
2021-09-09 15:48:51 +02:00
Nikita Popov 6381a16f3f Avoid use after free in internal prop type verification
This issue only applies to debug builds: read_property can free
the object, but we'd try to check the object handlers afterwards.
Rewrite the check in a way that only accessed the object before
the read_property call.

Fixes oss-fuzz #38297.
2021-09-09 15:30:32 +02:00
Nikita Popov b514e550a2 Merge branch 'PHP-8.1'
* PHP-8.1:
  Also make sure binary op operands can't be undef
2021-09-09 15:09:13 +02:00
Nikita Popov f86a963199 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Also make sure binary op operands can't be undef
2021-09-09 15:09:02 +02:00
Nikita Popov 8c3d33a054 Also make sure binary op operands can't be undef
Otherwise we will end up passing undef to xyz_function etc, which
is not permitted.
2021-09-09 15:08:08 +02:00
Nikita Popov 080ee14163 Merge branch 'PHP-8.1'
* PHP-8.1:
  Check whether expected types are present for compound op jit
2021-09-09 14:33:58 +02:00
Nikita Popov b9a6ec2097 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Check whether expected types are present for compound op jit
2021-09-09 14:33:10 +02:00
Nikita Popov bac054dbf3 Check whether expected types are present for compound op jit
zend_jit_long_math_helper() implicitly assumes that the operands
MAY_BE_LONG (but can also have additional types). It will normally
only be called if this is guaranteed. However, for compound
array/object assignment ops this was not check. Generalize the
existing check for assign_op to apply to these as well.

Of course, we could also make the code support this correctly,
but I don't think it makes sense to JIT these if the type we're
specializing for is not present.

Closes GH-7481.
2021-09-09 14:32:14 +02:00
Dmitry Stogov f983373e44 Merge branch 'PHP-8.1'
* PHP-8.1:
  JIT: fixed MUL+SEND optimization when MUL throws an exception
2021-09-08 17:57:43 +03:00
Dmitry Stogov 679bfb1522 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: fixed MUL+SEND optimization when MUL throws an exception
2021-09-08 17:57:21 +03:00
Dmitry Stogov 06275d940c JIT: fixed MUL+SEND optimization when MUL throws an exception 2021-09-08 17:53:23 +03:00
Nikita Popov f21a2489f8 Merge branch 'PHP-8.1'
* PHP-8.1:
  Apply fix to ARM JIT as well
2021-09-08 15:47:07 +02:00
Nikita Popov f2bb739eeb Apply fix to ARM JIT as well
This is the same change as e22fb46127,
but for the ARM JIT implementation.
2021-09-08 15:46:35 +02:00
Nikita Popov f811893e9c Merge branch 'PHP-8.1'
* PHP-8.1:
  Save register before throwing undef var notice
2021-09-08 14:46:21 +02:00
Nikita Popov 4bccf36973 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Save register before throwing undef var notice
2021-09-08 14:46:08 +02:00
Nikita Popov e22fb46127 Save register before throwing undef var notice
Otherwise we may clobber it while throwing the undef var notice.
This makes the implementation for assign_dim_op line up with
fetch_dim.
2021-09-08 14:45:49 +02:00
George Peter Banyard 989d539528 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix param name order for Phar::copy()
2021-09-08 12:33:14 +01:00
George Peter Banyard be2500f229 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix param name order for Phar::copy()
2021-09-08 12:32:58 +01:00
George Peter Banyard 0d0c9acafb Fix param name order for Phar::copy() 2021-09-08 12:31:09 +01:00
Nikita Popov 04f30bc850 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix jump after zend_jit_invalid_property_assign()
2021-09-08 12:29:16 +02:00
Nikita Popov 8d069d266a Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix jump after zend_jit_invalid_property_assign()
2021-09-08 12:29:05 +02:00
Nikita Popov b0e16f0e4f Fix jump after zend_jit_invalid_property_assign()
This is supposed to go to the FREE_OP_DATA, currently it crashes.
2021-09-08 12:27:54 +02:00
Máté Kocsis ad471fb22d Merge branch 'PHP-8.1'
* PHP-8.1:
  Remove extra space before param default values
  Fix class synopsis generation for interfaces
2021-09-08 12:25:13 +02:00
Máté Kocsis a5e5483439 Remove extra space before param default values 2021-09-08 12:24:47 +02:00
Máté Kocsis 4c9892d1e3 Fix class synopsis generation for interfaces
We have to generate <ooclass> elements for interfaces (rather than <oointerface>) in a number of places: directly inside the <classsynopsis> element and in the extends list.
2021-09-08 12:23:00 +02:00
Nikita Popov 8bc7b1a0c0 Merge branch 'PHP-8.1'
* PHP-8.1:
  Don't overwrite unwind exception
2021-09-08 11:04:52 +02:00
Nikita Popov f5cce2b167 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Don't overwrite unwind exception
2021-09-08 11:04:40 +02:00
Nikita Popov 85b80c5aaf Don't overwrite unwind exception
When killing a coroutine by throwing an unwind exit into it during
an I/O operation, the I/O failure may result in an exception being
thrown, which will replace the unwind exit exception and the
coroutine will ultimately not exit. This patch avoids this by
ignoring the newly thrown exception and keeping the unwind exit
exception.

Closes GH-7459.
2021-09-08 11:04:12 +02:00
Máté Kocsis 2aa9108691 Merge branch 'PHP-8.1'
* PHP-8.1:
  Improve class synopsis root element generation
2021-09-08 10:41:09 +02:00
Máté Kocsis f588764292 Improve class synopsis root element generation
Besides classrefs, we also have exceptionrefs. Also, the 4th capture group replacement used to be unintentionally duplicated.
2021-09-08 10:40:14 +02:00
Derick Rethans 3f39be1ff5 Merge branch 'PHP-8.1' 2021-09-07 17:28:43 +01:00
Derick Rethans 6dd2630ebd Merge branch 'PHP-8.0' into PHP-8.1 2021-09-07 17:28:32 +01:00
Derick Rethans c87f405084 Merge branch 'PHP-7.4' into PHP-8.0 2021-09-07 17:28:22 +01:00
Derick Rethans 95a943e2f0 The PHP 7.4 branch is for PHP 7.4.25 now 2021-09-07 17:28:16 +01:00
Sara Golemon 49056b7292 Merge branch 'PHP-8.1'
* PHP-8.1:
  Prep for 8.0.12
2021-09-07 15:18:47 +00:00
Sara Golemon 8670111846 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Prep for 8.0.12
2021-09-07 15:18:23 +00:00
Sara Golemon 5e1e4a8963 Prep for 8.0.12 2021-09-07 15:16:11 +00:00
Dmitry Stogov 20b8e27408 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fixed ARM JIT failure introduced in d4ed6b635f
2021-09-07 17:18:58 +03:00
Dmitry Stogov 487eface86 Fixed ARM JIT failure introduced in d4ed6b635f 2021-09-07 17:18:35 +03:00
Dmitry Stogov 5528c1daf3 Merge branch 'PHP-8.1'
* PHP-8.1:
  JIT: prefer string reallocation instead of allocation/memcpy/deallocation
2021-09-07 15:29:12 +03:00
Dmitry Stogov 7fcb45dffa JIT: prefer string reallocation instead of allocation/memcpy/deallocation 2021-09-07 15:28:15 +03:00
Dmitry Stogov 96ccb0e5e4 Merge branch 'PHP-8.1'
* PHP-8.1:
  JIT: improved code for protected properties access
2021-09-07 13:18:57 +03:00
Dmitry Stogov aed94e2ca8 JIT: improved code for protected properties access 2021-09-07 13:18:14 +03:00
Dmitry Stogov 231a1c2ae6 Merge branch 'PHP-8.1'
* PHP-8.1:
  JIT: eliminate check for undefined constant if there is a persistent constant
2021-09-07 13:18:04 +03:00
Dmitry Stogov 1bb6cf5396 JIT: eliminate check for undefined constant if there is a persistent constant 2021-09-07 13:17:16 +03:00
Dmitry Stogov f393f6c637 Merge branch 'PHP-8.1'
* PHP-8.1:
  JIT: Update run_time_cache slot in zend_jit_find_func helper
2021-09-07 13:16:54 +03:00