1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 19:23:22 +02:00
Commit Graph

125287 Commits

Author SHA1 Message Date
Dmitry Stogov 1ffbb7372a Better specialization for packed/hash arrays
- improved packed/hash inference.
- added hash guards for ASSIGN_DIM, ASSIGN_DIM_OP, FETCH_DIM_W* instructions
- more accurate invariant type guards motion
- invariant packed/hash guards motion
- rename MAY_BE_ARRAY_HASH into MAY_BE_ARRAY_NUMERIC_HASH and add MAY_BE_ARRAY_STRING_HASH
- cleanup
2021-08-13 14:30:41 +03:00
Ben Morss eb6c9eb936 Lossless conversion for webp
Propagating lossless conversion from libgd to our bundled gd.
Changing "quantization" to "quality" as in libgd.
Adding test.

IMG_WEBP_LOSSLESS is only defined, if lossless WebP encoding is
supported by the libgd used.

Closes GH-7348.
2021-08-12 23:19:13 +02:00
Nikita Popov b80767e219 Remove MYSQLND_SZ_T_SPEC
In favor of %zu, which msvc has supported for quite a while already.
2021-08-12 15:29:06 +02:00
Nikita Popov 8f5555605a Remove unused mysqlnd portability macros 2021-08-12 15:25:03 +02:00
Nikita Popov 277e169ef3 Remove mysqlnd local_tx functionality
These are not used in-tree and cause unnecessary complexity and
untestable failure modes.
2021-08-12 15:21:21 +02:00
Dmitry Stogov 94b800182d Fixed conditional jump on uninitialised value (Zend/tests/match/028.phpt failure with function JIT) 2021-08-12 16:05:05 +03:00
Nikita Popov 1c6df2dffd Fixed bug #81192
Normally the filename is the current filename, but when traits
are involved, it might be a different one.
2021-08-12 14:35:13 +02:00
Nikita Popov e539cb9ca0 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix port clash in socket tests
2021-08-12 12:02:37 +02:00
Nikita Popov 77c1c42c66 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix port clash in socket tests
2021-08-12 12:02:27 +02:00
Nikita Popov 78cbe56e68 Fix port clash in socket tests
Use ephemeral port instead.
2021-08-12 12:02:05 +02:00
Nikita Popov 4a4ae45a0b Fix bug #81142 by adding zend_string_init_existing_interned()
Add a new interned string handler that fetches an interned string
if it exists, but does not create one if it does not (and instead
returns a non-interned string).

This fixes bug #81142, by preventing the creating of new interned
strings for unserialized array keys.

Closes GH-7360.
2021-08-12 11:57:50 +02:00
Dmitry Stogov c39332d740 Fixed incorrect condition 2021-08-12 11:39:08 +03:00
Nikita Popov 02b5660c0f Clear ce cache when persisting for file cache only
We should clear the ce cache before storing the interned string,
while we still have a reference to the original ce cache slot.
2021-08-12 10:34:21 +02:00
Dmitry Stogov 57e2241cbc JIT: Use zend_hash_index_lookup() instead of zend_hash_index_add_new(EG(uninitialized_zval)) 2021-08-12 09:56:13 +03:00
Dmitry Stogov 6729276684 Eliminate "h < ht->nNumUsed" check in zend_hash_next_index_insert_new() 2021-08-12 02:29:24 +03:00
Dmitry Stogov 2e8904fee0 Use ZEND_HASH_FILL_* API. 2021-08-12 02:28:26 +03:00
Philip Hofstetter ace8fba759 Fix bug #81343: inconsistent type conversion after closeCursor
S->cols is already freed in the statement destructor and since
caa710037e the column data is only
populated on the first execute() which means that on subsequent
execute()s after closeCursor was called, all meta-data for column types
was removed and never restored

Closes GH-7355.
2021-08-11 18:24:13 +02:00
Dmitry Stogov 865b096890 Implement range inference for traces 2021-08-11 17:59:49 +03:00
Dmitry Stogov aaa14501f8 Make private functions "static" and remove unused zend_inference_check_recursive_dependencies(). 2021-08-11 16:07:21 +03:00
George Peter Banyard 98eb60a635 Refactor proc_open() implementation (#7255)
* Convert int return types to zend_result in proc_open.c

* Use bool instead of int type

* Use HashTable directly instead of zval

* Convert command field of process handle to zend_string
* proc_open() micro-optimization for Windows

Prevents some calls to strlen() on Windows
2021-08-11 14:51:55 +02:00
Remi Collet 1100a079ed NEWS 2021-08-11 14:21:18 +02:00
Remi Collet c51af22fef implement openssl_256 and openssl_512 for phar singatures 2021-08-11 14:13:57 +02:00
Remi Collet 8bb0c74e24 switch phar to use sha256 signature by default 2021-08-11 14:13:54 +02:00
Nikita Popov 14173186db Add EXTENSIONS section 2021-08-11 14:03:18 +02:00
Remi Collet 5d57d9073c NEWS 2021-08-11 13:04:23 +02:00
Remi Collet 718e91343f add SHA256 and SHA512 for security protocol 2021-08-11 13:02:18 +02:00
Nikita Popov 28500fe4ef Fixed bug #81349
The ascii to wchar was reporting errors using conv_illegal_output,
while it should have been using WCSGROUP_THROUGH. Effectively that
replaced illegal characters with '?' for the purpose of
identification.
2021-08-11 11:37:02 +02:00
Christoph M. Becker 923ff9f873 [ci skip] Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix SKIPIF clause
2021-08-11 11:16:25 +02:00
Christoph M. Becker e8a34d6cdf Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix SKIPIF clause
2021-08-11 11:13:49 +02:00
Christoph M. Becker 47aaffcdee Fix SKIPIF clause 2021-08-11 11:11:34 +02:00
Dmitry Stogov 14c103d7c5 Optimize "$x * 2" into "$x + $x" 2021-08-11 11:53:28 +03:00
Jeremy Mikola 858d0c0916 Include class name in Serializable deprecation message
The deprecation message was originally introduced in 3e6b447 (#6494).

I first encountered this notice when testing the MongoDB extension
with PHP 8.1, which produced many duplicate messages that provided
no detail about the particular class that needed to be fixed.

Closes GH-7346.
2021-08-11 10:35:47 +02:00
Joe Watkins a2e051921a Fix bug #81280 refuse to allow unicode chars in prompts 2021-08-11 10:35:00 +02:00
Radosław Kowalewski 3a4d0d360d Require sqlite >= 3.7.7 for URI in DSN (#7347)
SQLITE_OPEN_URI introduced in #6610 is available from sqlite version 3.7.7.
2021-08-11 10:31:28 +02:00
Nikita Popov 315f40942b Always use CE_CACHE, remove TYPE_HAS_CE (#7336)
Currently, CE_CACHE on strings is only used with opcache interned strings. This
patch extends usage to non-opcache interned strings as well. This means that
most type strings can now make use of CE_CACHE even if opcache is not loaded,
which allows us to remove TYPE_HAS_CE kind, and fix some discrepancies
depending on whether a type stores a resolved or non-resolved name.

There are two cases where CE_CACHE will not be used:

 * When opcache is not used and a permanent interned string (that is not an
   internal class name) is used as a type name during the request. In this case
   we can't allocate a map_ptr index for the permanent string, as it would be
   not be in the permanent map_ptr index space.
 * When opcache is used but the script is not cached (e.g. eval'd code or
   opcache full). If opcache is used, we can't allocate additional map_ptr
   indexes at runtime, because they may conflict with indexes allocated by
   opcache.

In these two cases we would end up not using CE caching for property types
(argument/return types still have the separate cache slot).
2021-08-11 10:28:52 +02:00
Nikita Popov 7d2a2c7dc0 Fix openssl memory leaks
Some leaks that snuck in during refactorings.
2021-08-11 10:11:12 +02:00
Nikita Popov 607be654fd Fixed bug #81342
Allow arbitrary whitespace, not just horizontal spaces.
2021-08-10 17:11:40 +02:00
Christoph M. Becker e9b28528d6 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #81346: Non-seekable streams don't update position after write
2021-08-10 16:51:56 +02:00
Christoph M. Becker a2b92d6baa Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #81346: Non-seekable streams don't update position after write
2021-08-10 16:50:36 +02:00
Christoph M. Becker 4a1af1f871 Fix #81346: Non-seekable streams don't update position after write
The stream position is not related to the buffer, and needs to be
updated for non-seekable streams as well.  The erroneous condition
around the position update is a relict of an old commit[1].

The unexpected test expectation is due to bug #81345.

[1] <https://github.com/php/php-src/commit/088e2692c3d1e680fd3d9306c4adb417e761acff>

Closes GH-7356.
2021-08-10 16:49:07 +02:00
Christoph M. Becker 961ac1f0fb Use --EXTENSIONS-- instead of --SKIPIF-- in new test case 2021-08-10 16:46:39 +02:00
Christoph M. Becker 4ff82eb96a Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #81302: Stream position after stream filter removed
2021-08-10 16:42:03 +02:00
Christoph M. Becker 2e71c94c9b Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #81302: Stream position after stream filter removed
2021-08-10 16:41:14 +02:00
Christoph M. Becker 40b31fcc80 Fix #81302: Stream position after stream filter removed
When flushing the stream filters actually causes data to be written to
the stream, we need to update its position, because that is not done by
the streams' write methods.

Closes GH-7354.
2021-08-10 16:39:55 +02:00
Christoph M. Becker 175533a753 [ci skip] Merge branch 'PHP-8.0'
* PHP-8.0:
  Prepare for PHP 8.0.11
2021-08-10 16:37:04 +02:00
Nikita Popov a4e206808c Use zend_string_equals_literal_ci() 2021-08-10 15:52:28 +02:00
David CARLIER e836143ad7 Fix dns resolv linkage issue on haiku (#7350) 2021-08-10 15:46:52 +02:00
Nikita Popov ca94d55a19 Mark DOM classes as not serializable 2021-08-10 14:22:26 +02:00
Nikita Popov 1c675b9d0d Switch mysqlnd auth to EVP_PKEY API 2021-08-10 12:36:44 +02:00
Nikita Popov ef787bae24 Switch dh_param handling to EVP_PKEY API 2021-08-10 12:17:17 +02:00