1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 11:13:36 +02:00
Commit Graph

3540 Commits

Author SHA1 Message Date
Nikita Popov 6ea870f5fb Fix bug #80184 2020-10-05 15:24:51 +02:00
Dmitry Stogov 109fb3e57d Copy optimization for (BINARY_OP/ACCIGN + SEND_VAL) 2020-10-02 12:06:02 +03:00
Dmitry Stogov b0e77066bd Fixed JIT for BINARY_OP with expected overflow 2020-10-02 11:01:35 +03:00
Dmitry Stogov fbf153a210 Fixed possible incorrect register usage 2020-10-02 10:48:45 +03:00
Dmitry Stogov 29dd1240f3 Clenup BINARY_OP + SEND_VAL optimization 2020-10-01 22:39:58 +03:00
Dmitry Stogov aecb05f5e7 Give preference to ENTER->RECURSIVE_CALL trace over ENTER->RETURN 2020-09-30 12:21:15 +03:00
Máté Kocsis fe64d73979 Review parameter names in ext/opcache
Closes GH-6237
2020-09-30 10:10:27 +02:00
George Peter Banyard 8d0b871bde Removed duplicate conditions 2020-09-30 08:15:04 +03:00
Dmitry Stogov b44cf93774 Allow tracing JIT cooperate with function JIT. 2020-09-29 16:33:32 +03:00
Dmitry Stogov 739eb435c2 Tracing JIT support for preloaded scripts 2020-09-29 15:07:45 +03:00
Dmitry Stogov dddb40313b Keep track information about used JIT trigger in ZEND_FUNC_INFO(op_array)->func_info.flags 2020-09-29 13:05:24 +03:00
Dmitry Stogov 8d9da8df28 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed unintended disabling of Optimizer for preloaded scripts introduced by 4a2646cf45
2020-09-29 12:13:17 +03:00
Dmitry Stogov 3928b6b435 Fixed unintended disabling of Optimizer for preloaded scripts introduced by 4a2646cf45 2020-09-29 12:11:01 +03:00
Dmitry Stogov f722512c4a Move invariant type guard out of loop 2020-09-28 23:54:28 +03:00
Dmitry Stogov c3206c28d7 Dump class names 2020-09-28 20:29:46 +03:00
Dmitry Stogov 2a71cb3ce1 Improved trace selection rules 2020-09-28 17:04:34 +03:00
Dmitry Stogov d1ddccdc19 Fixed usage of invalid frame for exit point 2020-09-28 16:18:06 +03:00
Dmitry Stogov 6dd840182e Missed opline guard 2020-09-28 14:47:45 +03:00
Dmitry Stogov 5783e611a2 Improve trace selection (avoid blacklisting of trace that may be linked). 2020-09-23 23:50:44 +03:00
Dmitry Stogov 3c4fb70f2b Replace ZEND_JIT_TRACE_STOP_RETURN_HALT and ZEND_JIT_TRACE_STOP_HALT by separate ZEND_JIT_TRACE_HALT flag. 2020-09-23 15:44:04 +03:00
Nikita Popov 7fedee873f Fix shift ub
And typo in macro name
2020-09-23 10:04:32 +02:00
Dmitry Stogov 3dde6fc4ac Fix extra args leak 2020-09-23 00:21:39 +03:00
Nikita Popov de77344de2 Promote pack/unpack format errors
Errors related to invalid format strings (unlike data mismatch
errors) should throw ValueError.

Closes GH-6185.
2020-09-22 15:12:05 +02:00
Nikita Popov 12d087c346 Use C zpp for get_class_vars() 2020-09-22 13:05:05 +02:00
Nikita Popov fdd9018bdf Support uuencoding empty string
Cross checking implementations from other languages, empty strings
are always allowed. PHP's output is peculiar due to it's insistence
to encode a trailing \0, but otherwise sensible and does round-trip
as expected.
2020-09-22 12:39:39 +02:00
Nikita Popov e60f927f05 stream_bucket_new() cannot return false
php_stream_bucket_new() is infallible.
2020-09-22 12:07:53 +02:00
Nikita Popov 9ef2c5c303 stream_get_transports/wrappers cannot return false
These may return an empty array, but not false.
2020-09-22 12:02:39 +02:00
Nikita Popov aba0ee71b2 Don't return false for empty string in soundex()
Return "0000" instead of false to have a consistent return type.
"0000" is already a possible return value if the string doesn't
contain any letters, such as with soundex(" "). We can treat the
case of soundex("") exactly the same.
2020-09-22 11:44:35 +02:00
Nikita Popov e547ea43c1 http_build_query() cannot fail
Assert that ht is not null and make php_url_encode_hash_ex() return
void to clarify that this is an infallible function.
2020-09-22 11:30:02 +02:00
Nikita Popov ade57e691b substr_replace() cannot return false 2020-09-22 09:59:35 +02:00
Dmitry Stogov 57a3fbb1e1 Fixed INIT_METHOD_CALL + IS_VAR + reference in tracing JIT 2020-09-22 00:47:23 +03:00
Dmitry Stogov 43e58d3221 Fixed incorrect assumption about sizeof(zend_reference) 2020-09-21 23:58:18 +03:00
Dmitry Stogov 4ff2122275 Ficed 32-bit JIT (inconsistent CPU stack state) 2020-09-21 23:43:31 +03:00
Dmitry Stogov 5a085777b7 Fixed incorrect JIT for FETCH_THIS+SEND_REF 2020-09-21 21:53:03 +03:00
Nikita Popov 8ff2f2f84b Return empty array for no rows in pg_fetch_all()
This makes it line up with pg_fetch_all_columns(), as well as
similar functions in other exts, such as mysqli_fetch_all().
2020-09-21 17:22:02 +02:00
Nikita Popov edf22962ef Make constant redeclaration a warning
We missed the change to make this an Error exception in PHP 8,
but at least elevate it to a warning, to avoid a notice -> exception
jump at a later time.
2020-09-21 17:04:39 +02:00
Nikita Popov 54f03d31e0 Promote invalid field to ValueError in pgsql
The same error condition is a ValueError in mysqli, be consistent.

Additionally, do not display the argument name for these errors.
As the signatures are overloaded, the argument name may not match
the meaning at all.
2020-09-21 17:00:23 +02:00
Nikita Popov d1bbc39e4c pg_unescape_bytea() can only fail on OOM
The implementation did not check for PQunescapeBytea failure
correctly, because it checked for a null pointer after estrndup,
which certainly cannot happen. Inspection of the PGunescapeBytea
implementation has shown that this function can only fail on OOM,
so let's check for that explicitly and remove false as a possible
return type.

While we're here, avoid an unnecessary copy of the result.
2020-09-21 15:46:55 +02:00
Sammy Kaye Powers 12306728c5 Add system ID entropy API
The `zend_system_id` is a (true global) system ID that fingerprints a process state. When extensions add engine hooks during MINIT/startup, entropy is added the system ID for each hook. This allows extensions to identify that changes have been made to the engine since the last PHP process restart.

Closes GH-5871
2020-09-18 14:26:44 -07:00
Nikita Popov c5401854fc Run tidy
This should fix most of the remaining issues with tabs and spaces
being mixed in tests.
2020-09-18 14:28:32 +02:00
Dmitry Stogov d5d31ea3b3 Cleanup observer API and add JIT support 2020-09-18 12:55:58 +03:00
Nikita Popov 34bb5ba2ea Remove support for EXT_NOP
This is an annoying edge case that regularly gets broken. As we're
not aware of significant users of this API, and there are other
ways to hook this, remove support for EXT_NOP.
2020-09-18 11:03:08 +02:00
Dmitry Stogov a9cbdafa69 Support for ZEND_COMPILE_EXTENDED_STMT 2020-09-17 23:19:28 +03:00
Dmitry Stogov 0f9aefa64f Fixed incorrect live-range construction 2020-09-17 19:39:44 +03:00
Dmitry Stogov 23429b5818 Fixed incorrect register allocation 2020-09-17 18:36:45 +03:00
Dmitry Stogov e9820bf470 Fixed memory leak in ext/spl/tests/bug77263.phpt 2020-09-17 11:55:50 +03:00
Nikita Popov 801cf66ab8 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #80083
2020-09-17 10:14:19 +02:00
Nikita Popov 9c136f10cd Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #80083
2020-09-17 10:13:53 +02:00
Nikita Popov a4f806aa79 Fixed bug #80083
Add db2_execute() to the list of functions accessing the local
scope. Ideally the API wouldn't do that, but it seems most
pragmatic to address this on the opcache side at this point.
2020-09-17 10:12:10 +02:00
Dmitry Stogov f786c0e097 Optimize code for FETCH_THIS + INIT_METHOD_CALL/ASSIGN_OBJ_OP/etc 2020-09-16 14:22:36 +03:00