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

4609 Commits

Author SHA1 Message Date
Nikita Popov
22b6aac66f Fix inc/dec of undef var with error handler
Set the variable to null after emitting the undef var notice
rather than before. This avoids an assertion failure if the var
is unset by the error handler.

The flip side is that this may cause a leak instead, but that's
the more harmless outcome.

Fixes oss-fuzz #36604.
2021-10-19 14:19:22 +02:00
Dmitry Stogov
bdebefaa61 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fixed incorrect optimization that may cause JIT assertion
2021-10-18 23:20:53 +03:00
Dmitry Stogov
6bd5271c62 Fixed incorrect optimization that may cause JIT assertion 2021-10-18 23:18:52 +03:00
Dmitry Stogov
288de4f54e Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Tracing JIT: Fixed memory leak
2021-10-18 22:19:36 +03:00
Dmitry Stogov
d3063c02c6 Tracing JIT: Fixed memory leak 2021-10-18 22:14:53 +03:00
Dmitry Stogov
f2771d2f5b Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fixed DASM_S_RANGE_VREG error
2021-10-18 18:00:10 +03:00
Dmitry Stogov
e59d0a7151 JIT: Fixed DASM_S_RANGE_VREG error 2021-10-18 17:58:42 +03:00
Dmitry Stogov
0e42c9e1d0 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Tracing JIT: Fixed ADD with two references to arrays
2021-10-18 17:29:34 +03:00
Dmitry Stogov
13d1244575 Tracing JIT: Fixed ADD with two references to arrays 2021-10-18 17:26:36 +03:00
Dmitry Stogov
441e64f143 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Tracinf JIT: Prevnt generation code for instruction that with cyclic dependency
2021-10-18 16:57:34 +03:00
Dmitry Stogov
6021e72143 Tracinf JIT: Prevnt generation code for instruction that with cyclic dependency
e.g. $a[] += $a is compiled into ASSIGN_DIM_OP+OP_DATA, where OP_DATA.op1_use depends on ASSIGN_DIM_OP.op1_def
2021-10-18 16:53:45 +03:00
Dmitry Stogov
f8b1853816 Tracing JIT: propagete op1 type info of FETCH_DIM_FETCH_ARG in read mode 2021-10-15 15:36:27 +03:00
Dmitry Stogov
af0a980f45 Tracing JIT: Use information about really called internal function return type to improve type inference. 2021-10-15 12:30:16 +03:00
Dmitry Stogov
88982a1d20 JIT: Use more general type guard to prevent useless trace splitting 2021-10-14 23:55:35 +03:00
Dmitry Stogov
28cca5d451 JIT: Fixed incorrect FETCH_OBJ_W code for typed property (ARM64 part) 2021-10-13 14:51:34 +03:00
Dmitry Stogov
afeadc668b JIT: Fixed incorrect FETCH_OBJ_W code for typed property 2021-10-13 14:48:06 +03:00
Dmitry Stogov
da05c0a84f JIT: Avoid generation of unused exit point for conditional braches with NULL/FALSE/TRUE operand 2021-10-12 16:57:33 +03:00
Nikita Popov
9ebe8494b8 Don't replace tmp with cv in YIELD argument
For by-ref generators, these may have different behavior.

Fixes oss-fuzz 6059739298004992.
2021-10-12 14:26:53 +02:00
Dmitry Stogov
1208fe932a Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fixed type inference for COPY_TMP
2021-10-11 16:56:40 +03:00
Dmitry Stogov
a4c41d45cd Fixed type inference for COPY_TMP 2021-10-11 16:56:07 +03:00
Dmitry Stogov
912f040583 JIT: Fixed incorrect deoptimization info 2021-10-11 14:10:02 +03:00
Nikita Popov
f0cf999223 Preserve key/value type invariant in range() type inference
Don't set PACKED key type if no value type is set.

Fixes oss-fuzz 6718410667458560.
2021-10-11 12:41:46 +02:00
Dmitry Stogov
bbe21365b4 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fixed usage of incorrect specialized zval destructor
2021-10-11 13:02:45 +03:00
Dmitry Stogov
ccdda69a18 JIT: Fixed usage of incorrect specialized zval destructor 2021-10-11 13:00:23 +03:00
Dmitry Stogov
04064187c2 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fixed type inference (ASSIGN_OP with typed reference may cause type conversion)
2021-10-11 10:50:06 +03:00
Dmitry Stogov
ed8ec9d71e Fixed type inference (ASSIGN_OP with typed reference may cause type conversion) 2021-10-11 10:48:49 +03:00
Dmitry Stogov
30f1f4b75b Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fixed incorrect double/long register hinting
2021-10-08 15:47:21 +03:00
Dmitry Stogov
bbd875268a JIT: Fixed incorrect double/long register hinting 2021-10-08 15:46:49 +03:00
Dmitry Stogov
26bc7b38fb Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fixed extension handling
2021-10-08 14:08:34 +03:00
Dmitry Stogov
b279de416e JIT: Fixed extension handling 2021-10-08 14:06:32 +03:00
Dmitry Stogov
b2c43a4efb Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Flush error messages emitted during preloading
2021-10-08 12:35:38 +03:00
Dmitry Stogov
45b127ad4a Flush error messages emitted during preloading 2021-10-08 12:34:25 +03:00
Dmitry Stogov
c9fb384c40 JIT ARM64: Use proper register 2021-10-08 09:56:44 +03:00
Dmitry Stogov
d12d987686 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fixed FETCH_LIST_R on string
2021-10-07 22:15:30 +03:00
Dmitry Stogov
7cea20f937 JIT: Fixed FETCH_LIST_R on string 2021-10-07 22:13:39 +03:00
Dmitry Stogov
6bf1d24fbc Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fixed bug #81512 (Unexpected behavior with arrays and JIT)
2021-10-07 21:29:04 +03:00
Dmitry Stogov
b47a48ff80 Fixed bug #81512 (Unexpected behavior with arrays and JIT) 2021-10-07 21:24:38 +03:00
Nikita Popov
71e82b9de2 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Check exception after undef var notice
2021-10-07 17:01:16 +02:00
Nikita Popov
b564113756 Check exception after undef var notice
For simple assignments, we may not emit an exception check elsewhere,
so perform it directly after the undef var notice.
2021-10-07 16:54:26 +02:00
Nikita Popov
d5e4f8ffe8 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Handle undefined dim in assign_dim_helper
2021-10-07 15:35:45 +02:00
Nikita Popov
08c29a657d Handle undefined dim in assign_dim_helper
Not only the value can be undefined here, but the offset as well.
2021-10-07 15:35:16 +02:00
Nikita Popov
e32c850d4f Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Set opline before calling undef op helper
  JIT: Fixed wrong comparison skip
2021-10-07 14:40:38 +02:00
Nikita Popov
455837139e Set opline before calling undef op helper 2021-10-07 14:38:02 +02:00
Dmitry Stogov
a743fd7633 JIT: Fixed wrong comparison skip 2021-10-07 15:27:56 +03:00
Dmitry Stogov
7eab93bcbb Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fixed incorrect reference handling in PRE_INC/DEC_OBJ
2021-10-07 14:34:46 +03:00
Dmitry Stogov
6ab36fb6f9 JIT: Fixed incorrect reference handling in PRE_INC/DEC_OBJ 2021-10-07 14:34:18 +03:00
Dmitry Stogov
919fd56d7a Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fixed incorrect code generation for JMPZ
2021-10-07 13:55:14 +03:00
Dmitry Stogov
cd45bd0a81 JIT: Fixed incorrect code generation for JMPZ 2021-10-07 13:48:28 +03:00
Dmitry Stogov
fd8dfc4248 XFAIL: Return types cannot be inferred through prototypes 2021-10-06 17:21:02 +03:00
Dmitry Stogov
5557d15311 JIT ARM64: Fixed NaN handling 2021-10-06 16:50:25 +03:00