Commit Graph

361 Commits

Author SHA1 Message Date
Nikita Popov
be7e819068 Fixed bug #77922
In PHP 7.3 shadow properties are no longer duplicated. Make sure we
only release them if the property was defined on the parent class,
which means that it changed from private->shadow, which is where
duplication does happen.
2019-08-17 10:58:54 +02:00
Zeev Suraski
9afce019e0 Future-proof email addresses 2018-11-01 18:35:32 +02:00
Nikita Popov
d36230fcab Fix incorrect literal freeing if pass_two generates fatal error 2018-09-04 08:08:39 +02:00
Xinchen Hui
3131ebcea8 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Update NEWS
  Fixed bug #76754 (parent private constant in extends class memory leak)
2018-08-17 13:36:03 +08:00
Xinchen Hui
ca103b415e Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #76754 (parent private constant in extends class memory leak)
2018-08-17 13:35:31 +08:00
Xinchen Hui
04c4854fdf Fixed bug #76754 (parent private constant in extends class memory leak) 2018-08-17 13:35:15 +08:00
Gabriel Caruso
562150906a Remove extra semicolons 2018-07-26 12:38:22 +02:00
Peter Kokot
8d3f8ca12a Remove unused Git attributes ident
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-07-25 00:53:25 +02:00
Dmitry Stogov
7d4e18b05d Improved user iterator implementation to reduce zend_class_entry memory consumption and avoid race condition during resolving/caching of user iterator functions of internal classes in ZTS build. 2018-07-12 14:04:14 +03:00
Dmitry Stogov
85ee47eda0 Changed structure of zend_class_entry.trait_aliases and zend_class_entry.trait_precedences to avoid keeping "intermediate" trait references, that are used only during inheritance. 2018-07-11 18:56:10 +03:00
Dmitry Stogov
716bbd3480 Remove duplicated code (keep destroy_zend_function() for compatibility) 2018-06-27 14:54:42 +03:00
Dmitry Stogov
6dc0cd868d Fixed ZTS race condition (zend_class_entry->ce_flags of internal classes must not be modified, because internal class enties are shared between threads) 2018-06-27 12:33:20 +03:00
Dmitry Stogov
5eb1f92f31 Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence. 2018-05-28 16:27:12 +03:00
Dmitry Stogov
1a63fa6ec9 Implemented Request #76178 (Class constants are slow: they should be inlined at runtime)
Run-time cache is used to eliminate recalculation of constant expression in RECV_INIT opcode (only non reference countable values are cached).
2018-05-03 14:40:18 +03:00
Dmitry Stogov
c7045174f1 Moved compiler helper functions from zend_opcode.c to zend_compile.c 2018-03-13 13:49:58 +03:00
Dmitry Stogov
a7f83f474c Memory leak fix, for arg_info of internal functions with type hints (ZTS build only). 2018-03-06 14:59:30 +03:00
Nikita Popov
7ff186434e Explicitly sort live ranges by start opnum
Instead of moving live ranges around to maintain the start opnum
invariant, add an explicit sorting step in pass two.
2018-02-16 21:51:50 +01:00
Dmitry Stogov
ca035f26aa Moved "zval.u2.cache_slot" into free room of "zend_op" 2018-02-05 19:41:47 +03:00
Dmitry Stogov
ba298725d1 Changed CATCH instruction format (extended_value moved into op2, op2 into result, result into extended_value) 2018-01-31 22:39:30 +03:00
Dmitry Stogov
17a3b48454 Make IS_UNUSED to be zero. 2018-01-31 11:18:41 +03:00
Dmitry Stogov
e229e7b657 Inline function 2018-01-16 14:13:49 +03:00
Dmitry Stogov
c9034c3b33 Get rid of zend_op_array.early_binding 2018-01-11 19:15:52 +03:00
Dmitry Stogov
57e4be9cef Avoid, most offten unnecessary, memory load. 2018-01-11 12:15:34 +03:00
Gabriel Caruso
6400264856 Trailing whitespaces
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-03 14:38:00 +01:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Xinchen Hui
7a7ec01a49 year++ 2018-01-02 12:55:14 +08:00
Xinchen Hui
ccd4716ec7 year++ 2018-01-02 12:53:31 +08:00
Dmitry Stogov
8482a6f511 Fixed use-after free introduced in fcc08ce19f 2017-10-31 01:20:38 +03:00
Dmitry Stogov
fcc08ce19f Prevent reference-counting on persistent zvals (internal constants, default properties and constants of internal classes).
New macro ZVAL_COPY_OR_DUP() is used perform duplication, if necessary.
This should eliminate related race-coditions in ZTS build and prevent reference-counting bugs after unclean shutdown.
2017-10-30 23:13:10 +03:00
Dmitry Stogov
49ea143bbd Encapsulate reference-counting primitives.
Prohibit direct update of GC_REFCOUNT(), GC_SET_REFCOUNT(), GC_ADDREF() and GC_DELREF() shoukf be instead.
Added mactros to validate reference-counting (disabled for now).
These macros are going to be used to eliminate race-condintions during reference-counting on data shared between threads.
2017-10-27 01:28:58 +03:00
Dmitry Stogov
fcccb0d6ea Use zval_ptr_dtor_nogc() in places where circular zvals are not possible 2017-10-09 12:24:11 +03:00
Dmitry Stogov
e70618aff6 Changed the way VM accesses constant operands in 64-bit builds. 2017-10-04 16:53:01 +03:00
Dmitry Stogov
168ec3a6e1 Fixed ZTS build (disable deallocation of arg_info of internal functions with type hints) 2017-09-13 10:10:56 +03:00
Dmitry Stogov
10a7f2cf62 Fixed memry leaks (free arg_info of internal functions with type hints) 2017-09-13 01:44:19 +03:00
Anatol Belski
bc5811f361 further sync for vim mode lines 2017-07-04 18:12:45 +02:00
Dmitry Stogov
55cd4e859b Added missed opcodes 2017-07-03 21:26:44 +03:00
Dmitry Stogov
f25ecdacf8 shutdown_executor() refactoring (reuse opcache fast request shutdown code) 2017-06-22 01:45:28 +03:00
Nikita Popov
ad8652818a Implement jumptable optimization 2017-04-10 22:23:14 +02:00
Nikita Popov
a1d5686a3c Fix assertion violation with composer 2017-01-24 11:32:41 +01:00
Dmitry Stogov
141d1ba980 Introduced "zend_type" - an abstraction for type-hinting representation. 2017-01-13 11:37:46 +03:00
Sammy Kaye Powers
dac6c639bb Update copyright headers to 2017 2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Dmitry Stogov
ebb99a1a3a Fixed compilation warnings 2016-06-21 16:55:17 +03:00
Dmitry Stogov
a9512af810 Implemented RFC: Fix inconsistent behavior of $this variable
Squashed commit of the following:

commit bdd3b6895c
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Jun 16 00:19:42 2016 +0300

    Fixed GOTO VM

commit 2f1d7c8b89
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jun 15 21:01:57 2016 +0300

    Removed unused variable

commit cf749c42b0
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jun 15 19:06:16 2016 +0300

    Protection from $this reassign through mb_parse_str()

commit 59a9a6c83c
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jun 15 18:14:50 2016 +0300

    Added type inference rule for FETCH_THIS opcode

commit 73f8d14a85
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jun 15 18:11:18 2016 +0300

    Restored PHP-7 behavior of isset($this->foo).
    It throws exception if not in object context.
    Removed useless opcode handlers.

commit fa0881381e
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue May 31 12:25:47 2016 +0300

    Changed "Notice: Undefined variable: this" into "Exception: Using $this when not in object context".

commit e32cc528c0
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue May 24 02:02:43 2016 +0300

    Throw exception on attempt to re-assign $this through extract() and parse_str().

commit 41f1531b52
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon May 23 22:18:36 2016 +0300

    Fixed inconsistent $this behavior
2016-06-16 02:30:23 +03:00
Nikita Popov
cb3825a8dc Small generator-related cleanups 2016-06-04 13:27:11 +02:00
Dmitry Stogov
2ae21abdf7 Fixed bug #72213 (Finally leaks on nested exceptions).
Squashed commit of the following:

commit 8461b0407f
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed May 25 00:34:42 2016 +0300

    Rmoved zend_try_catch_element.parent and walk through op_array.try_catch_array backward from the current try_cacth_offset.

commit 0c71e24964
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed May 25 00:04:53 2016 +0300

    Move SAVE_OPLINE() to its original place

commit 111432a4df
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed May 25 00:01:10 2016 +0300

    Separate the common part of ZEND_HANDLE_EXCEPTION and FAST_RET into zend_dispatch_try_catch_finally_helper.

commit 4f21c06c2e
Author: Nikita Popov <nikic@php.net>
Date:   Tue May 24 14:55:27 2016 +0200

    Improve finally fix

commit da5c727499
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue May 24 10:36:08 2016 +0300

    Fixed Zend/tests/try/bug70228_3.phpt and Zend/tests/try/bug70228_4.phpt

commit cfcedf2fb4
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue May 24 02:59:27 2016 +0300

    Added test

commit 4c6aa93d43
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue May 24 00:38:20 2016 +0300

    Added tests

commit 8a8f4704b0
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon May 23 23:27:34 2016 +0300

    Fixed bug #72213 (Finally leaks on nested exceptions)
2016-05-25 01:25:12 +03:00
Dmitry Stogov
be071702b3 Fixed bug #72188 (Nested try/finally blocks losing return value) 2016-05-13 14:38:43 +03:00
Dmitry Stogov
2578d08033 Fixed compilation warnings 2016-04-29 14:44:56 +03:00
Nikita Popov
6c47455f73 Fix assert() in EXT mode 2016-03-25 19:27:20 +01:00
Nikita Popov
8e5b139732 Evaluate arguments of new for classes without ctor
ML: http://markmail.org/message/4b3mk7jid64zvz34
2016-03-25 19:11:37 +01:00