Dmitry Stogov
02acc5ad3b
Fixed Bug #81255 (Memory leak in PHPUnit with functional JIT)
2021-07-20 22:14:32 +03:00
Nikita Popov
051ff33660
Fix bug #81272 : Fix func info for functions returning EMPTY_ARRAY
...
The empty array has refcount > 1, so we should indicate this in
func info. In most cases this renders the func info redundant,
so drop it entirely.
2021-07-20 14:40:17 +02:00
Christoph M. Becker
ef77d3c89f
Fix #81206 : Multiple PHP processes crash with JIT enabled
...
We need to avoid resetting the JIT for all SAPIs, but we need to
initialize the JIT handlers even when only reattaching on Windows.
Closes GH-7208.
2021-07-19 23:45:37 +02:00
Dmitry Stogov
15abbea5e7
Avoid ASAN integer overflow warnings
2021-07-19 14:53:23 +03:00
Hao Sun
c5d93aeee9
Fixed incorrec immediate encoding when using LEA optimization
2021-07-19 14:51:08 +03:00
Dmitry Stogov
c0e4932816
Fixed bug #81249 (Intermittent property assignment failure with JIT enabled)
2021-07-19 12:11:09 +03:00
Dmitry Stogov
ee981619ce
Skip test on 32-bit system
2021-07-19 10:49:43 +03:00
Dmitry Stogov
9cd437138e
Fixed bug #81225 (Wrong result with pow operator with JIT enabled)
2021-07-19 10:39:52 +03:00
Nikita Popov
6fd880890c
Add exception check to zend_jit_fetch_obj_w_slow()
...
This ports 247105ae1a to the JIT
implementation. The issue doesn't trigger on the original test
case with JIT, but I ran into a case that does trigger with JIT
once we have typed properties.
2021-07-14 16:56:12 +02:00
Christoph M. Becker
d86c25d88e
Fix build
...
`accel_system_id` gas been renamed to `zend_system_id`.
2021-07-04 23:13:50 +02:00
Christoph M. Becker
948b83d7ea
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Avoid OOB reads in create_name_with_username()
2021-07-04 22:54:48 +02:00
Christoph M. Becker
b1840737e2
Avoid OOB reads in create_name_with_username()
...
`accel_uname_id` and `zend_system_id` are MD5 buffers which are not
NUL terminated. Thus, we must not pass them to `snprintf()`.
Closes GH-6968.
2021-07-04 22:51:55 +02:00
Dmitry Stogov
99c0efc77a
JIT/x86: Fixed possible incorrect exception catching in function JIT.
2021-06-30 18:16:38 +03:00
Dmitry Stogov
ced8e88438
JIT/x86: Fixed possible incorrect register allocation
2021-06-17 18:42:11 +03:00
Dmitry Stogov
1082669e24
JIT: Fixed failures of tracing JIT with CALL VM
...
This fixes:
- tests/lang/bug28800.phpt
- Zend/tests/settype_resource.phpt
- Zend/tests/type_declarations/scalar_return_basic_64bit.phpt
2021-06-17 14:21:40 +03:00
Dmitry Stogov
df16fd149b
Fixed incorrect type inference for "(array)$null".
2021-06-17 13:03:09 +03:00
Nikita Popov
67cf04f791
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Mitigation for bug #81096
2021-06-10 10:54:21 +02:00
Nikita Popov
3f4bc94b00
Mitigation for bug #81096
...
This issue is properly fixed by GH-7121 on master. For older
branches, disable the use of range information in SCCP, to
reduce impact of potentially incorrect ranges.
2021-06-10 10:52:53 +02:00
Dmitry Stogov
ac65f6af6e
Fixed bug #81051 (Broken property type handling after incrementing reference)
2021-05-27 15:22:34 +03:00
Máté Kocsis
ceb0951fa5
mysqli_get_client_info() cannot return null
...
This method is already deprecated
2021-05-26 17:48:35 +02:00
Nikita Popov
9f6ee9f4d7
Update func info for mysqli_connect
2021-05-26 14:36:21 +02:00
Dmitry Stogov
11a7310b49
Disable ASSIGN + SEND_VAL fusion for cases when destroying of old value may throw an exception.
2021-05-21 13:36:58 +03:00
Dmitry Stogov
025c0763e7
Fix register save/restore around calls. (This fixes
...
ext/opcache/tests/jit/fetch_dim_rw_001.phpt with -d opcache.jit=1202
without PROFITABILITY_CHECKS)
2021-05-21 11:08:56 +03:00
Dmitry Stogov
bf21261c63
Add missing undefined variable warning an result initialization.
...
(This fixes Zend/tests/bug78531.phpt without PROFITABILITY_CHECKS).
2021-05-21 10:03:00 +03:00
Dmitry Stogov
db309b2e4b
Don't assign to string offset after exception (This fixes
...
Zend/tests/bug31098.phpt failure without PROFITABILITY_CHECKS)
2021-05-21 00:48:24 +03:00
Dmitry Stogov
cce0cc8836
JIT: Fixed incorrect condition (this leaded to
...
Zend/tests/type_declarations/typed_properties_083.phpt failure without
PROFITABILITY_CHECKS)
2021-05-21 00:01:00 +03:00
Dmitry Stogov
6e2d47e071
Fixed bug #80968 (JIT segfault with return from required file)
2021-05-20 16:45:24 +03:00
Nikita Popov
62a9f97381
Move preload_autoload assignment into preload_load()
...
We need to set the preload autoloader even if preloading happened
in a different process. accel_preload() will only run in one.
In particular, this fixes the behavior if preload_user is used.
2021-05-19 12:55:46 +02:00
Nikita Popov
c446d68f7c
Fixed bug #81046
...
Literal compaction was incorrectly assuming that literals with
the same base literal and the same number of related literals
would be equal. Maybe that was the case historically, but at
least it isn't true in PHP 8, where FETCH_CONSTANT and INIT_METHOD
have distinct literals at the second position.
Fix this by making the cache key a concatenation of all literals,
rather than just the base literal. We still distinguish the number
of related literals based on a bias added to the string hash.
2021-05-17 15:46:49 +02:00
Dmitry Stogov
e96b984026
Fixed JIT on first function execution (opcache.jit=1215) with CALL VM
2021-05-12 12:24:18 +03:00
Dmitry Stogov
6fa4493f7b
Fixed incorrect stack size calculation (sizeof(zval) == 16)
2021-05-12 02:08:53 +03:00
David Carlier
d87d2f006c
opcache: more reliable way to get the current binary on solaris/illumos
...
Closes GH-6920.
2021-05-06 14:33:53 +02:00
Nikita Popov
dd3e56ba24
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fixed bug #81015
2021-05-06 10:46:30 +02:00
Nikita Popov
178bbe3478
Fixed bug #81015
...
Make sure that the previous opline is part of the same block,
otherwise it may be non-dominating.
The test case does not fail on PHP-7.4, but I think the general
problem can appear on 7.4 as well, so I'm applying the patch to
that branch.
2021-05-06 10:46:00 +02:00
Nikita Popov
bf9dc53435
Fixed bug #81007
...
Backport a change from the master branch. We usually test 32-bit
using -m32 from an x86-64 host, probably nobody tried using an
actual 32-bit host.
2021-05-05 16:53:43 +02:00
Nikita Popov
2ceef24f4a
Remove incorrect func info for array_reduce() and pos()
...
These are both clearly not rc1 functions. As they are otherwise
UNKNOWN_INFO, I'm just dropping them entirely.
2021-04-28 11:41:21 +02:00
Nikita Popov
028dd891f9
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
filter_var_array() may return array_of_ref
2021-04-28 11:27:55 +02:00
Nikita Popov
5acab7ebb4
filter_var_array() may return array_of_ref
...
This function preserves references in the input array.
2021-04-28 11:27:14 +02:00
Nikita Popov
220ffb90d0
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
fetch_assoc may return array_key_long
2021-04-28 11:20:38 +02:00
Nikita Popov
67c4d1f5b9
fetch_assoc may return array_key_long
...
If the column name is a number (which is possible at least via
AS clauses), then symtable canonicalization will convert it into
an integer key.
2021-04-28 11:18:36 +02:00
Nikita Popov
76d1120a48
Remove assert_options() return value info
...
The ASSERT_CALLBACK value is not validated at all -- it's possible
to set it to an arbitrary value. As such, the function can also
return any value or type (even without outright abuse, the opcache
func info was wrong in that the return can be rcn, and the array
can be array_of_ref).
2021-04-28 11:05:05 +02:00
Nikita Popov
af9fadc55a
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
password_get_info() may return array_of_null
2021-04-28 10:55:43 +02:00
Nikita Popov
c340f97ab0
password_get_info() may return array_of_null
...
The algo key is set to null if the algorithm can't be detected.
2021-04-28 10:54:31 +02:00
Nikita Popov
4a5bda6a8d
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
getdate() may return array_key_long
2021-04-28 10:47:45 +02:00
Nikita Popov
c7387ab92f
getdate() may return array_key_long
...
This function mostly uses string keys, but the timestamp is
returned at key 0 (why???)
2021-04-28 10:46:37 +02:00
Nikita Popov
98a071e880
pg_connect() may return rcn
...
Without CONNECT_FORCE_NEW, pg_connect() may resuse an existing
connection and refcount may be larger than one.
2021-04-28 10:36:48 +02:00
twosee
d4a206b276
Backport "ignore some opcodes in the JIT check"
...
This is a backport of fc64a7bef4 to the PHP-8.0 branch so that extensions don’t have to bypass the JIT check in a hacky way.
2021-04-19 14:28:15 +08:00
twosee
a3e6735999
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fixed bug #80900
# Conflicts:
# ext/opcache/Optimizer/sccp.c
2021-04-14 00:15:06 +08:00
twosee
7c6cf09463
Fixed bug #80900
...
SCCP optimization marks the wrong target feasible when the constant is of the incorrect type.
Closes GH-6861.
2021-04-14 00:07:32 +08:00
Nikita Popov
a1fdfa700b
Fixed bug #80950
...
Function info for curl_exec() incorrect specified that the
function cannot return true. This is already fixed in PHP 8,
as the func info entry was removed there.
2021-04-12 16:05:37 +02:00