1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 17:38:14 +02:00
Commit Graph

2373 Commits

Author SHA1 Message Date
Dmitry Stogov 29902e0e46 Merge branch 'PHP-7.4'
* PHP-7.4:
  More edge case fixes that may cause bug #78106
2019-06-14 13:10:39 +03:00
Dmitry Stogov 96a12578c1 More edge case fixes that may cause bug #78106 2019-06-14 13:10:02 +03:00
Dmitry Stogov ca486893ba Merge branch 'PHP-7.4'
* PHP-7.4:
  Attempt to fix edge conditions that may cause bug #78106
2019-06-14 12:48:00 +03:00
Dmitry Stogov 91a6cdbff5 Attempt to fix edge conditions that may cause bug #78106 2019-06-14 12:47:22 +03:00
Dmitry Stogov 5883dbcb18 Fixed incorect register allocation in ZTS build 2019-06-14 00:29:22 +03:00
Nikita Popov 026023bd71 Merge branch 'PHP-7.4' 2019-06-13 12:54:17 +02:00
Nikita Popov e5be58f57c Merge branch 'PHP-7.3' into PHP-7.4 2019-06-13 12:54:10 +02:00
Nikita Popov bada2049ca Merge branch 'PHP-7.2' into PHP-7.3 2019-06-13 12:52:32 +02:00
Nikita Popov f1a8138055 Fixed bug #78106
When disabling opcache during the request via opcache.enable ini
setting, make sure we also disable ZCG(accelerator_enabled).
2019-06-13 12:51:35 +02:00
Nikita Popov b2b9c4785f Merge branch 'PHP-7.4' 2019-06-13 12:41:14 +02:00
Nikita Popov da275e6214 Merge branch 'PHP-7.3' into PHP-7.4 2019-06-13 12:41:01 +02:00
Nikita Popov ee137a7033 Merge branch 'PHP-7.2' into PHP-7.3 2019-06-13 12:38:57 +02:00
Nikita Popov f8a68fd935 Add test for bug #78106
Also add PHP_TEST_EXTRA_ARGS environment variable, which allows
to pass on -c, -d etc flags provided by run-tests.php. Otherwise
we won't get the built-in server to run with opcache.
2019-06-13 12:35:29 +02:00
Nikita Popov 3b27689d46 Fix helper call on 32-bit
This is using the fast-call calling convention. Use FCARG1a and
same code for 32-bit and 64-bit.
2019-06-13 12:11:23 +02:00
Nikita Popov 792e38d863 Fix bug #78154 with JIT 2019-06-13 11:53:31 +02:00
Nikita Popov 51d82da6b0 Suppress -Wtautological-compare in dasc file 2019-06-13 09:59:42 +02:00
Nikita Popov 39034dbc67 Determine thread ID on macos
Also initialize the variable to 0 -- I don't think we really care
if this is not determine on some platform, but it should at least
not be uninitialized.
2019-06-13 09:59:42 +02:00
Nikita Popov ff8002fc7c Mark label as potentially unused 2019-06-12 16:47:48 +02:00
Nikita Popov 180b29a493 Merge branch 'PHP-7.4' 2019-06-11 15:41:13 +02:00
Nikita Popov 83e0bfb50c Merge branch 'PHP-7.3' into PHP-7.4 2019-06-11 15:41:05 +02:00
Tyson Andre 5d3e3a62a2 Be more precise about possible types for mysqli methods
mysqli has an uncommon approach to 64-bit compatibility:
it will convert numbers that can't be represented on 32-bit
platforms to a string.
This is documented at
https://www.php.net/manual/en/mysqli-stmt.affected-rows.php#refsect1-mysqli-stmt.affected-rows-returnvalues

So if there's a query to a remote mysqli server that affects
more than 2.2 billion rows, then the opcache inference might be
incorrect.

(It's possible to add a MAY_BE_STRING_ON_32_BIT_PLATFORM bitflag macro to
account for this, but I don't think there's a need or want to?)

Patches 3162285b86

This is based on the list of php 7.4 functions using
MYSQLI_RETURN_LONG_INT in mysqli_api.c
2019-06-11 15:40:33 +02:00
Tyson Andre 07c63c6fdf Fix opcache signatures for mysqli_stat
See mysqli_api.c and https://www.php.net/manual/en/mysqli.stat.php
2019-06-11 15:39:59 +02:00
Tyson Andre 7350e808c5 Fix bug in opcache flags for mysqli_get_charset
https://www.php.net/manual/en/mysqli.get-charset.php
tests/mysqli_field_seek.phpt has a test of this returning an object.

Looking at the source in ext/mysqli/mysqli_nonapi.c,
this should be object|null, not array|null

This might actually cause bugs in opcache's inferences,
(no proof of this)
so it might make sense to pull this patch into an earlier minor version.
2019-06-11 15:39:59 +02:00
Nikita Popov e4fae9c061 Merge branch 'PHP-7.4' 2019-06-11 13:16:38 +02:00
Nikita Popov 89b2d88659 Register class before fetching parent
We want the class declaration to be available while compiling the
parent class.
2019-06-11 13:09:33 +02:00
Nikita Popov 7d98dd9c1c Merge branch 'PHP-7.4' 2019-06-11 10:29:20 +02:00
Nikita Popov eecd8961d9 Add get_mangled_object_vars() function 2019-06-11 10:28:29 +02:00
Tyson Andre cdc82f19d8 Fix php 8.0's opcache flags for pathinfo()
See https://php.net/pathinfo

This fixes a bug introduced in the cleanup for commit
0d79c70cf3

`pathinfo($str, PATHINFO_EXTENSION)` will always return a string
(if there is no extension, the function returns the empty string)
2019-06-11 09:09:50 +02:00
Joe Watkins 678e3eb0b7 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix typo in opcache function flag info (mage->image)
2019-06-11 09:08:31 +02:00
Tyson Andre 5c8b702e77 Fix typo in opcache function flag info (mage->image)
ext/gd/gd.c seems to return null for wrong parameter count, false for
error, and long otherwise. See https://php.net/imagecolorallocate

In php 8.0, the MAY_BE_NULL can probably be removed.
2019-06-11 09:08:23 +02:00
Tyson Andre cbaf37ff75 Delete opcache flags for php 8.0's removed mbereg*() aliases
See UPGRADING for Mbstring.
All of these are aliases of corresponding `mb_*`
functions that existed in php 7 but were removed in php 8.

Other functions such as gzgetss were already removed.
2019-06-11 09:07:42 +02:00
Joe Watkins 6c195fb846 Merge branch 'PHP-7.4'
* PHP-7.4:
  Clean up opcache func flags for set_socket_blocking
2019-06-11 09:06:48 +02:00
Tyson Andre b921564a35 Clean up opcache func flags for set_socket_blocking
It was removed in php 7.0. See https://php.net/set_socket_blocking
2019-06-11 09:05:57 +02:00
Joe Watkins 0542eb5bd5 Rest of c3e78efecf 2019-06-11 09:05:07 +02:00
Tyson Andre 98b487e244 Fix a typo in opcache func info for "get_parrent_class"
This should only have one r.
http://php.net/get_parent_class mentions that it returns string|false

Also, I'm not 100% sure if this is right - should this include
MAY_BE_NULL to handle the case of too many parameters?
(then again, get_called_class() also returns null in the global scope)

```
php > var_export(get_parent_class(2,3));
Warning: get_parent_class() expects at most 1 parameter, 2 given in php
shell code on line 1
NULL
```
2019-06-11 08:59:12 +02:00
Dmitry Stogov 09a24d0b7c Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed possible misalignment in 32-bit build.
2019-06-10 12:53:34 +03:00
Dmitry Stogov 46df9a858c Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed possible misalignment in 32-bit build.
2019-06-10 12:53:04 +03:00
Dmitry Stogov a0749fe483 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed possible misalignment in 32-bit build.
2019-06-10 12:52:50 +03:00
Dmitry Stogov 199eb2b110 Fixed possible misalignment in 32-bit build. 2019-06-10 12:51:59 +03:00
Nikita Popov 8b2741c1c3 Fix accidentially dropped type
I only meant to drop the MAY_BE_FALSE here, not the MAY_BE_ARRAY...
2019-06-06 10:07:59 +02:00
Nikita Popov 252216b2de Remove possible false return value from get_object_vars()
I'm not sure this one ever happens in practice (and we might want
to forbid NULL return from get_properties), but if it does, return
an empty array instead of false.
2019-06-06 09:49:25 +02:00
Nikita Popov 001d434449 Finish func_info updates for ext/standard 2019-06-03 11:26:25 +02:00
Nikita Popov fd911a7124 Expect string argument in hexdec, octdec, bindec
Instead of accepting zval and converting to string. Also rewrite the
functions to make it obvious that they cannot return false.
2019-06-03 11:26:25 +02:00
Nikita Popov 321fe88935 Add Z_PARAM_NUMBER and use it for some functions 2019-06-03 10:14:05 +02:00
Nikita Popov 673c70a4ba A few more func info updates 2019-05-31 11:24:47 +02:00
Dmitry Stogov b4a3b49eab Merge branch 'PHP-7.4'
* PHP-7.4:
  Better hot/cold code splitting
2019-05-31 12:22:08 +03:00
Dmitry Stogov 1df9f238fe Better hot/cold code splitting 2019-05-31 12:20:21 +03:00
Nikita Popov 0ba34824f5 Use TypeError instead of warning in implode()
These are again manual argument type checks.
2019-05-31 11:04:13 +02:00
Nikita Popov 45a0656e95 Remove get() object handler
Now that set() is gone, there is little point in keeping get(), as
it is essentially just a different way of writing cast_object()
now.

Closes GH-4202.
2019-05-29 17:15:19 +02:00
Nikita Popov 07fae1fd6e escapeshellarg/escapeshellcmd: Throw TypeError instead of E_ERROR 2019-05-29 16:57:53 +02:00