1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 07:28:09 +02:00
Commit Graph

2807 Commits

Author SHA1 Message Date
Dmitry Stogov 7b69855bd0 Fixed type_info for new array element (it may be only NULL) 2019-12-26 16:32:45 +03:00
Dmitry Stogov cc29cbe80c cleanup 2019-12-26 11:54:05 +03:00
Dmitry Stogov e874811221 Build call graph before type inference 2019-12-24 16:15:24 +03:00
Dmitry Stogov 1e53769d82 Set opcode handler 2019-12-23 14:14:47 +03:00
Christoph M. Becker dabc28d182 Fix #78880: Spelling error report
We fix the most often occuring typos according to a recent codespell
report[1] in tests, code comments and documentation.

[1] <https://fossies.org/linux/test/php-src-master-f8f48ce.191129.tar.gz/codespell.html>.
2019-12-21 11:58:00 +01:00
Máté Kocsis d9eb97d745 Remove unnecessary FN type information from OPCache
GH-5029
2019-12-20 16:45:57 +01:00
Máté Kocsis 0e8070778e Make get_defined_vars() always return an array
GH-5025
2019-12-20 14:31:57 +01:00
Máté Kocsis f52f471a5e Fix F1 type information in OPCache
Closes GH-5025
2019-12-20 14:31:30 +01:00
Nikita Popov 2bc0a6e97f Fix string offset signed int UB in jit as well 2019-12-20 12:11:07 +01:00
Máté Kocsis bf645d6dc1 Remove unnecessary F0 type information from OPCache
Closes GH-5024
2019-12-20 12:03:08 +01:00
Nikita Popov aadd5e69e0 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #78986
2019-12-18 11:41:11 +01:00
Nikita Popov bd4fce4f6f Fixed bug #78986
Don't assume that handlers live in the arena, they may also be in
SHM.
2019-12-18 11:40:58 +01:00
Dmitry Stogov b7e1eecd54 Avoid generation of "jmp" to next instruction 2019-12-17 15:42:02 +03:00
Dmitry Stogov 97bba4ffd6 Make "exception_handler_undef" stub to check EG(opline_before_exception) and undefine corresponnding result variable, if necessary.
This fixes few invalid "exception_handler_undef" usages.
2019-12-17 14:09:26 +03:00
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