1
0
mirror of https://github.com/php/php-src.git synced 2026-04-14 03:22:58 +02:00
Commit Graph

2793 Commits

Author SHA1 Message Date
Dmitry Stogov
546392b346 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #78961 (erroneous optimization of re-assigned $GLOBALS)
2019-12-16 12:25:40 +03:00
Dmitry Stogov
6ef7e53c1b Fixed bug #78961 (erroneous optimization of re-assigned $GLOBALS) 2019-12-16 12:24:47 +03:00
Nikita Popov
a40a69fdd0 Merge branch 'PHP-7.4'
* PHP-7.4:
  Introduce extra counter to avoid RTD key collisions
2019-12-13 11:05:41 +01:00
Nikita Popov
0f2cdbf214 Introduce extra counter to avoid RTD key collisions
Also generate a fatal error if a collision occurs in zend_compile.

This is not perfect, because collisions might still be introduced
via opcache, if one file is included multiple times during a request,
invalidate in the meantime and recompiled by different processes.

This still needs to be addressed, but this patch fixes the much
more common case of collisions occuring when opcache is not used.

Fixes bug #78903.
2019-12-13 11:04:44 +01:00
Nikita Popov
d56768817b Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #78950: Preloading trait method with static variables
2019-12-12 11:52:51 +01:00
Nikita Popov
be89a5c7f1 Fixed bug #78950: Preloading trait method with static variables
We need to make sure that trait methods with static variables
allocate a separate MAP slot for the static variables pointer,
rather than working in-place.
2019-12-12 11:52:43 +01:00
Nikita Popov
cf9362195b Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix handling of non-final loop var free in sccp
2019-12-12 09:40:54 +01:00
Nikita Popov
2d03b638dc Fix handling of non-final loop var free in sccp
We only need to preserve the FE_FREE that marks the end of the
loop range. Skip FE_FREEs with the FREE_ON_RETURN flag.
2019-12-12 09:39:52 +01:00
Tyson Andre
1695d3ed07 Add funcinfo for spl global functions
This assumes that `iterator_*` will now always throw or abort on failure.

Also, move #include _arginfo.h directive to the top of the file - virtually all
other files put it there, and developers may base code on basic_functions.c.

Closes GH-4968
2019-12-11 18:17:04 -05:00
Dmitry Stogov
ee45dbab37 Merge branch 'PHP-7.4'
* PHP-7.4:
  Addirional fix for bug #78918
2019-12-11 12:29:10 +03:00
Dmitry Stogov
3280209c03 Addirional fix for bug #78918 2019-12-11 12:21:49 +03:00
Dmitry Stogov
8fb3ef6e37 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #78937 (Preloading unlinkable anonymous class can segfault)
2019-12-11 00:47:15 +03:00
Dmitry Stogov
20ef51db22 Fixed bug #78937 (Preloading unlinkable anonymous class can segfault) 2019-12-11 00:46:30 +03:00
Dmitry Stogov
764c8159b7 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix error message
2019-12-10 22:17:42 +03:00
Dmitry Stogov
518a8f89c1 Fix error message 2019-12-10 22:17:10 +03:00
Nikita Popov
c2d92ad971 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix incorrect zend_try usage
2019-12-10 15:22:46 +01:00
Nikita Popov
5ddcacac2e Fix incorrect zend_try usage 2019-12-10 15:22:31 +01:00
Nikita Popov
fa18c115be Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix release build failure
2019-12-10 13:53:19 +01:00
Nikita Popov
d6f86caa11 Fix release build failure
GCC complained about potentially uninitialized __orig_bailout,
even though the variable has an initializer. This warning was
quite persistent, I was only able to avoid it by using a separate
function.

Am I missing something?
2019-12-10 13:51:09 +01:00
Christoph M. Becker
f2dbe4297b Merge branch 'PHP-7.4'
* PHP-7.4:
  Improve error message
2019-12-10 13:20:55 +01:00
Christoph M. Becker
9e22c3d4d9 Improve error message
Formerly, the error message was like:

| Can't preload unlinked class MyException: Internal parent (Windows
| only limitation)Exception

Now it's like:

| Can't preload unlinked class MyException: Windows can't link to
| internal parent Exception
2019-12-10 13:19:58 +01:00
Nikita Popov
5cdea8d5e8 Merge branch 'PHP-7.4'
* PHP-7.4:
  Add support for class_alias to preloading
  Fixed bug #78935: Check that all linked classes can be preloaded
2019-12-10 13:12:29 +01:00
Nikita Popov
baf3a9133b Add support for class_alias to preloading
Related to bug #78918.
2019-12-10 13:06:36 +01:00
Nikita Popov
3f86adb0ef Fixed bug #78935: Check that all linked classes can be preloaded
During preloading, check that all classes that have been included
as part of the preload script itself (rather than through opcache_compile_file)
can actually be preloaded, i.e. satisfy Windows restrictions, have
resolved initializers and resolved property types. When resolving
initializers and property types, also autoload additional classes.
Because of this, the resolution runs in a loop.
2019-12-10 13:05:48 +01:00
Nikita Popov
ea4bb58889 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix merge mistake
2019-12-10 09:04:01 +01:00
Nikita Popov
4313659bb9 Fix merge mistake 2019-12-10 09:03:44 +01:00
Nikita Popov
c124d202e2 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix DCE with FE_FETCH
2019-12-10 09:01:55 +01:00
Nikita Popov
7e028a41e2 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix DCE with FE_FETCH
2019-12-10 09:01:18 +01:00
Nikita Popov
87691e74e5 Fix DCE with FE_FETCH
For now, don't treat FE_FETCH op2 as no-val use. See GH-4982.
2019-12-10 09:00:09 +01:00
Máté Kocsis
9563449d8b Add stubs for another batch of standard functions 2019-12-09 19:47:08 +01:00
Máté Kocsis
6f9248359e Throw an exception when an invalid comparison operator is passed to version_compare() 2019-12-09 19:44:01 +01:00
Dmitry Stogov
ebf35cc8e8 Fixed operation with result in CPU register 2019-12-06 17:16:46 +03:00
Dmitry Stogov
990b556761 Use cheaper code for overflow +/-1 2019-12-06 14:04:58 +03:00
Nikita Popov
e0a8c7a8d0 Remove CV limitation when determining value from type in SCCP
As far as I can determine, this is no longer a problem: We will
not try to remove the defining instructions (this is only done if
the value is known by SCCP itself) and we also only determine
non-refcounted values in this way, so it is not a problem if the
FREE is omitted.
2019-12-05 15:26:16 +01:00
Nikita Popov
9e403d65d8 Add DCE support for ARRAY_KEY_EXISTS 2019-12-05 14:55:22 +01:00
Máté Kocsis
29ef07728e Remove magic quotes legacy 2019-12-05 13:15:54 +01:00
Máté Kocsis
144b41ce88 Remove money_format() function 2019-12-05 13:15:54 +01:00
Máté Kocsis
64468d1e3b Remove convert_cyr_string() function 2019-12-05 13:15:54 +01:00
Máté Kocsis
b63c625260 Remove hebrevc() function 2019-12-05 13:15:54 +01:00
Tyson Andre
616ec2dd98 Update/fix remaining opcache zend_func_info.c signatures
See UPGRADING:

> . The GD extension now uses objects as the underlying data structure for
>   images, rather than resources. These objects are completely opaque, i.e.
>   they don't have any methods.

Remove types which are no longer in Reflection due to throwing instead of
emitting warnings.
Remove entries where reference counts are 0 and types are duplicated.

Closes GH-4967.
2019-12-05 07:29:03 +01:00
Tyson Andre
96d2b69653 Remove opcache signatures duplicating reflection
None of these are refcounted.
2019-12-04 09:50:24 -05:00
Tyson Andre
1142f0c4a5 Make more opcache signatures consistent with reflection 2019-12-04 09:40:42 -05:00
Nikita Popov
7b34e30b9a Merge branch 'PHP-7.4'
* PHP-7.4:
  Preload: Better reason message for internal parents on windows
2019-12-04 09:53:08 +01:00
Nikita Popov
7cbf31a3c7 Preload: Better reason message for internal parents on windows
Related to bug #78881.
2019-12-04 09:52:40 +01:00
Tyson Andre
0dbc24c3fa Fix other incorrect opcache types
Closes GH-4959.
2019-12-04 07:40:25 +01:00
Tyson Andre
5624d2eb00 Make some opcache types consistent with reflection information
Remove functions such as filter_id() where reference counts and types are
identical to what's in opcache.

Remove null types from zend_func_info.c that aren't in Reflection
(php would throw now)

Fix the Reflection type information for assert_options()

    php > assert_options(ASSERT_CALLBACK, static function() {});
    php > var_export(assert_options(ASSERT_CALLBACK));
    Closure::__set_state(array(
    ))

Closes GH-4958.
2019-12-04 07:31:06 +01:00
Nikita Popov
8dead642fe Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix print_r return types in opcache
2019-12-04 07:17:18 +01:00
Nikita Popov
39b08ba99c Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix print_r return types in opcache
2019-12-04 07:16:56 +01:00
Tyson Andre
c8e9aa854c Fix print_r return types in opcache
https://www.php.net/print_r

> When the return parameter is TRUE, this function will return a string.
> Otherwise, the return value is TRUE.
2019-12-04 07:16:32 +01:00
Adam Saponara
b35acd30f2 Fix misleading error message in ZendAccelerator.c.
Currently this error emits something like...

`Error Cannot kill process 12345: Success!`

...due to calling `time` before `strerror` which clears `errno`. This
patch adds an error log immediately after both `kill` calls which gives
us better indication of what exactly failed.
2019-12-02 10:06:32 +01:00