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
ee17296e7b
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix memory leak
2022-06-20 11:00:32 +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
c430116a11
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix memory leak
2022-05-16 13:48:40 +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
Arnaud Le Blanc
332bd03782
Do not optimize out ini_get() when the entry does not exist during compilation ( #8507 )
...
The entry may exist later if dl is enabled
Fixes GH-8466
2022-05-13 12:35:00 +02: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
948ef10dd0
Fix ISSET_ISEMPTY_VAR missoptimization
...
This fixes oss-fuzz #46909
2022-04-25 13:31:01 +03:00
Dmitry Stogov
1aa5e9392d
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Reorder optimization passes to avoid miss-optimization
2022-04-25 13:09:31 +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
18b4e36df1
Move check for named params in fcall optimization earlier
...
I don't think this is strictly necessary, but I think it makes
sense to check this before interpreting opline->op2.num as an
argument number.
This also adds one more has_known_send_mode() check that I had
missed before.
2022-04-18 18:21:24 +02:00
Nikita Popov
11f950e77e
Don't optimize trailing args for prototype fbc
2022-04-18 17:57:16 +02:00
Nikita Popov
b0ab5d0fb0
Don't set ce for by-ref return type
...
For the case where we upgrade a prototype to a possible by-ref
return from an inheriting method.
2022-04-15 23:55:48 +02: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
770a544af4
Optimizer: Fix inorrect constant substitution in FETCH_LIST_R
...
Fixes oss-fuzz #45429
2022-03-11 14:30:27 +03:00
Dmitry Stogov
1f5562aa09
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fixed memory leak
2022-03-11 11:33:01 +03:00
Dmitry Stogov
aced867a95
Fix typr inference
...
Fixes oss-fuzz #45020
2022-02-28 18:25:49 +03:00
Dmitry Stogov
56d7672d56
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fixed incorrect DCE for FREE
2022-02-28 11:54:25 +03:00
Christoph M. Becker
33cd61c904
Fix GH-8140: Wrong first class callable by name optimization
...
When optimizing by name function calls, we must not replace
`CALLABLE_CONVERT` opcodes, but have to keep them.
Closes GH-8144.
2022-02-24 10:35:53 +01:00
Christoph M. Becker
7ea3b19331
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix GH-8074: Wrong type inference of range() result
2022-02-22 10:20:13 +01:00
Dmitry Stogov
7e8257fbd2
Disable ASSIGN optimization for values inferred for fatal errors.
2022-02-18 11:35:43 +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
34c2324fbf
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix too aggressive DCE that leads to memory leak
2022-01-28 12:18:47 +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
906cb52c63
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fixed NAN handling in SCCP
2022-01-10 19:40:22 +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
b2939b636d
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix memory leak in SCCP
2021-12-24 13:10:58 +03:00
Dmitry Stogov
ca3f7b0a73
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix incorrect optimization of ASSIGN_OP that may lead to memory leak
2021-12-20 15:17:30 +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
f8f0a650a7
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix incorrect optimization that leads to memory leak
2021-12-13 13:09:05 +03:00
Christoph M. Becker
a708db9c8a
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix GH-7759: Incorrect return types for hash() and hash_hmac()
2021-12-12 15:47:19 +01: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
363434bab2
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix incorrect JMP optimization
2021-12-10 01:44:55 +03:00
Nikita Popov
cf377eefa6
Don't convert assign op operand types in opcache
...
This is the same change as 56b18d478e
but for ASSIGN_OP. Changing the operand type may change the error
message and can result in different behavior with operator overloading.
As with the other patch, if there is strong interest this could be
added to the DFA pass instead, with an appropriate type check.
2021-12-06 21:56:04 +01:00
Dmitry Stogov
572c09d373
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fixed incorrect DCE of a constructor call
2021-12-06 16:00:30 +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
c3766c08f4
Fix SCDF cleanup of unused basic block, kept only because of FREE of a loop var
...
Fixes oss-fuzz #41516
2021-12-01 18:03:08 +03:00