Niels Dossche
d94ddbed2c
Fix updating SSA object type for *_ASSIGN_OP ( #10458 )
...
The code fetched the class entry into ce for objects and static
properties. However, when the actual update needs to take place (when
result_def exists), the class entry in ce was reset to NULL. So the SSA
object type update never happened. Fetch the class entry in the
result_def>=0 case instead after the reset of ce to NULL.
2023-02-14 11:29:29 +03:00
Dmitry Stogov
81607a62ca
Fix type inference
...
Fixes oss-fuzz #55358
2023-01-30 13:15:05 +03:00
Niels Dossche
2787e3cd65
Fix incorrect check condition in type inference ( #10425 )
...
The "nothing to do" case would never be hit because the switch block
would execute if the opcode is ZEND_ASSIGN_STATIC_PROP_OP,
not ZEND_ASSIGN_STATIC_PROP. This meant that we were falling through to
the else block. Fix this by correcting the check condition.
2023-01-24 09:32:07 +03:00
Dmitry Stogov
c852e0fff9
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix type inference
2022-09-05 12:56:34 +03:00
Dmitry Stogov
95befc786a
Fix type inference
...
Fixes oss-fuzz #50272
2022-08-22 21:11:39 +03:00
Dmitry Stogov
d50875c822
Fix type inference
...
Fixes oss-fuzz #49423 and #49474
2022-07-25 15:53:06 +03:00
Dmitry Stogov
82d3ad64df
Fix type inference
...
Fixes oss-fuzz #48908
2022-07-18 14:20:06 +03:00
Dmitry Stogov
b734d45626
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix type inference for FETCH_DI_UNSET
2022-07-18 13:15:03 +03:00
Dmitry Stogov
729be469ae
Fix type inference
...
This dixes oss-fuzz #47921
2022-06-14 11:59:35 +03:00
Dmitry Stogov
1b45efb6fb
Fix type inference
...
This fixes oss-fuzz #47920
2022-06-14 10:20:45 +03:00
Dmitry Stogov
b86c6245cc
Fix type inference
...
This fixes oss-fuzz #47777
2022-06-06 11:13:53 +03:00
Dmitry Stogov
aad5fbac85
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix type inference
2022-05-16 12:42:04 +03:00
Dmitry Stogov
84c1e99ecf
Fix type inference
...
This fizes oss-fuzz #47044
2022-05-11 12:39:26 +03:00
Dmitry Stogov
f1fc58ed8d
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix type inference
2022-05-11 12:09:53 +03:00
Dmitry Stogov
e14dc15e13
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix type inference
2022-04-25 12:17:07 +03:00
Dmitry Stogov
2cff0e674d
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix type narrowing warning during type inference of ZEND_FETCH_DIM_W
2022-04-25 11:17:04 +03:00
Nikita Popov
4026daee2b
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Move MAY_BE_REF check into COPY_SSA_OBJ_TYPE
2022-04-15 23:14:59 +02:00
Nikita Popov
38547b996a
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Don't use CE for by-ref arguments
2022-04-15 23:00:59 +02:00
Nikita Popov
f1814e6a1f
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Don't use CE info from pi node for MAY_BE_REF var
2022-04-15 22:37:29 +02:00
Nikita Popov
3fdb1aa14e
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix inference for assignment of known object to reference
2022-04-15 22:15:32 +02:00
Nikita Popov
c72e9621ce
Improve type narrowing fix
...
We need to explicitly model the null return type for property
accesses on non-objects.
2022-04-10 11:22:36 +02:00
Nikita Popov
323f3c6914
Improve file/line information for narrowing warning
...
Report the file/line of the opline rather than the include location.
This should make issues like #8251 easier to debug.
2022-04-10 10:41:20 +02: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
156d3aedc1
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix memory leak
2022-03-14 12:58:11 +03:00
Dmitry Stogov
aced867a95
Fix typr inference
...
Fixes oss-fuzz #45020
2022-02-28 18:25:49 +03:00
Dmitry Stogov
0eb96b6e13
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix type inference
2022-02-11 13:04:12 +03:00
Dmitry Stogov
9824735aa4
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix type inference
2022-01-10 21:54:14 +03:00
Dmitry Stogov
8e5f54ed0c
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix type inference for assign to string offset with invalid index.
2022-01-10 16:05:01 +03:00
Dmitry Stogov
8862e23098
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix reference contig inference
2021-12-28 10:00:14 +03:00
Dmitry Stogov
c8d10a8243
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix type inference for INIT_ARRAY with invalid index
2021-12-20 11:46:36 +03:00
Dmitry Stogov
cfcee97ad6
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Remove range inference for booleans.
2021-12-10 14:33:36 +03:00
Dmitry Stogov
4ed10f3d47
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix refcount inferemce ($a += $a returns old array with RCN)
2021-12-06 11:31:51 +03:00
Dmitry Stogov
3564001502
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
JIT: Fix incorrect reference counting inference
2021-11-30 13:00:04 +03:00
Dmitry Stogov
2d3ea98624
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fixed type inference (it's safe to ignore reference counting narrowing)
2021-11-29 23:39:37 +03:00
Dmitry Stogov
23c5a6fd16
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
JIT: Fix exception handling when next array element is already occupied
2021-11-29 21:57:29 +03:00
Dmitry Stogov
c6e895aec2
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Disable type narrowing optimization when we contruct SSA for JIT
2021-11-29 15:53:16 +03:00
Dmitry Stogov
b1a1ed380f
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fixed incorrect narrowing to double
2021-11-25 15:15:01 +03:00
Dmitry Stogov
ecc4d1326b
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fixed incorrect refcountion inference for BW_NOT
2021-11-25 13:53:26 +03:00
Dmitry Stogov
fb582f4230
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
JIT: Fixed reference-counting inference
2021-11-15 10:40:35 +03:00
Dmitry Stogov
9bd490dc33
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fixed incorrect reference counter inference
2021-11-08 20:54:45 +03:00
Dmitry Stogov
22a171a0b5
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fixed type inference for FETCH_DIM_W without use
2021-11-03 19:45:30 +03:00
Dmitry Stogov
d4a7e4d1ff
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fixed incorrect assumption about reference counting
2021-11-01 20:28:33 +03:00
Nikita Popov
a89546d8b3
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Handle FETCH_DIM_R after FETCH_DIM_FUNC_ARG in inference
2021-11-01 14:27:14 +01:00
Nikita Popov
3d38960979
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix range inference hang
2021-11-01 12:32:04 +01: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
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
Nikita Popov
3661c1932c
Fix array cast type inference wrt packed arrays
...
Use KEY_LONG instead of PACKED if it's possible for the array to
be empty. It won't be packed in that case.
Fixes oss-fuzz #39650 .
2021-10-06 10:50:44 +02:00
Nikita Popov
944d653b3d
Fix inference for INIT_ARRAY with illegal offset type
...
Extract assign_dim_array_result_type() helper that can be reused
for INIT_ARRAY and implements all this logic correctly.
Fixes oss-fuzz 5156868775870464.
2021-09-29 11:09:04 +02:00
Nikita Popov
69eb6e04a7
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix ASSIGN_DIM result inference with typed refs
Remove outdated code in ASSIGN_DIM type inference
2021-09-28 14:14:29 +02:00
Nikita Popov
2b71df71a1
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix type inference and SCCP with typed references
2021-09-28 12:59:24 +02:00