Dmitry Stogov
a2e8334613
Allocate only necessary space for static properties of internal classes in ZTS mode.
2018-10-01 19:05:31 +03:00
Nikita Popov
5a4cb3edde
Fix missing access errors for guarded properties
...
If a property access would normally result in a magic method call,
but the property is subject to an active recursion guard, the
access should behave as if the magic method does not exist.
This commit fixes one instance where this was not the case -- we
should have been generating a property access error, but instead
the operation simply did not do anything.
2018-09-27 14:58:26 +02:00
Dmitry Stogov
49b92446d7
Remove zend_check_private()
2018-09-13 13:47:06 +03:00
Dmitry Stogov
a12cd1c5e0
Split error code into "cold" functions and cleanup.
2018-09-13 10:31:49 +03:00
Dmitry Stogov
e1ef054be5
Micro-optimization (condition reordering)
2018-09-13 09:31:38 +03:00
Dmitry Stogov
eb4148e02d
typo
2018-09-13 08:49:21 +03:00
Dmitry Stogov
f79270d876
Micro-optimization
2018-09-13 01:41:19 +03:00
Dmitry Stogov
cdeebfd4af
Avoid unnecesury iterations over parent classes, in case of no overriden private properties.
2018-09-12 23:47:52 +03:00
Dmitry Stogov
5293dd9d8b
Optimize method/property visibility checks
2018-09-12 18:59:12 +03:00
Dmitry Stogov
3444c260a2
Merge branch 'PHP-7.3'
...
* PHP-7.3:
Fixed bug #76869 (Incorrect bypassing protected method accessibilty check).
2018-09-12 12:27:48 +03:00
Dmitry Stogov
655a99d131
Fixed bug #76869 (Incorrect bypassing protected method accessibilty check).
2018-09-12 12:16:50 +03:00
Dmitry Stogov
aee4b145ef
Optimisation: Check for private property in parent class makes sense only if we already found a property info. Check for property started with "\\0" makes sense only if we didn't find property info.
2018-09-12 09:57:36 +03:00
Dmitry Stogov
73efd1b651
Simplify method visibility checks
2018-09-12 08:31:01 +03:00
Dmitry Stogov
06f056a760
Additional fix for bug #76860 .
2018-09-11 18:29:27 +03:00
Nikita Popov
e1123e3e4e
Drop unused variable
2018-09-11 15:16:11 +02:00
Dmitry Stogov
3a249e769b
Squashed commit of the following:
...
commit 2d3cac9e00
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Sep 11 11:54:47 2018 +0300
Fixed static property access
commit 31786ee272
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Sep 11 11:05:29 2018 +0300
Avoid duplicate checks
commit 5ae502b979
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Sep 11 10:39:17 2018 +0300
Optimization
commit 82c17f0e8a
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Sep 11 09:26:50 2018 +0300
Removed unused zend_duplicate_property_info()
commit ba53d1d0dd
Merge: eacc11b8fd
c4b14370cf
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Sep 11 09:24:13 2018 +0300
Merge branch 'master' into shadow
* master:
7.0.33 next
Sync NEWS [ci skip]
add NEWS for 76582
Enforce ordering of property compare in object comparisons
Fixed wrong assertion
Skip test on unsuitable env
commit eacc11b8fd
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Sep 10 13:12:39 2018 +0300
Fixed failure of ext/spl/tests/array_017.phpt
commit 62d1871430
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Sep 10 11:55:07 2018 +0300
Fixed issues
commit 1d37e3a40e
Merge: d6c3f098b6
1e550e6f7e
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Sep 10 10:21:20 2018 +0300
Merge branch 'master' into shadow
* master:
Update NEWS
Fix for bug #76582
Fix ssl stream reneg limit test to print only after first renegotiation
Make a copy unconditionally
Fix memory leak in pcre cache
Remove not needed checking for <errno.h>
Remove HAVE_ASSERT_H
Add test for bug #76850
Fixed bug #76850 Exit code mangled by set locale/preg_match
Remove empty PHP tags from test
Fix #75273 : php_zlib_inflate_filter() may not update bytes_consumed
Fix PCRE2 exclusion and remove dead libs in Makefile.gcov
Report mem leaks to stderr if no Win debugger is present
Use combined assignment contanation operator
Fixed bug #76796
Support fixed address mmap without replacement
commit d6c3f098b6
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Sep 7 13:56:30 2018 +0300
Get rid of ZEND_ACC_SHADOW
2018-09-11 11:56:45 +03:00
Sara Golemon
7f56150ef2
Merge branch 'PHP-7.3'
...
* PHP-7.3:
Enforce ordering of property compare in object comparisons
2018-09-10 08:56:19 -04:00
Sara Golemon
a26a107aae
Enforce ordering of property compare in object comparisons
2018-09-10 08:47:50 -04:00
Dmitry Stogov
1321aa5080
Merge branch 'PHP-7.3'
...
* PHP-7.3:
Stop using zend_function->reserved[] space.
2018-08-22 10:44:34 +03:00
Dmitry Stogov
8d95f561e4
Stop using zend_function->reserved[] space.
2018-08-22 10:43:51 +03:00
Gabriel Caruso
84b195d9fc
Fix some misspellings
2018-08-12 16:15:45 +02:00
Xinchen Hui
642bb9f376
Unused var
2018-08-01 16:45:15 +02:00
Xinchen Hui
85145e509e
Unused var
2018-08-01 14:49:06 +08:00
Dmitry Stogov
3ccd985478
Improved method visibility checks
2018-07-31 13:05:57 +03:00
Dmitry Stogov
57527455eb
Simplified property name to string conversion
2018-07-31 12:24:53 +03:00
Dmitry Stogov
c42f0ba4f7
Removed useless IS_UNDEF checks
2018-07-31 12:23:46 +03: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
d775fe33d1
Better name: ZEND_PROPERTY_HAS => ZEND_PROPERTY_NOT_EMPTY
2018-07-24 09:31:57 +03:00
Xinchen Hui
1638a6e118
Give a meaningful name
2018-07-24 12:51:36 +08:00
Dmitry Stogov
412dd75e05
Perform checks for propertis started with '\\0' only for dynamic properties
2018-07-18 14:49:00 +03:00
Dmitry Stogov
4182b0855f
Avoid copying
2018-07-10 13:17:33 +03:00
Dmitry Stogov
7da042cbd8
Use ZVAL_COPY_DEREF()
2018-07-10 12:11:10 +03:00
Dmitry Stogov
0db8c974a5
Avoid useless copying
2018-07-10 12:03:32 +03:00
Dmitry Stogov
dbb9867b3e
Avoid useless checks for public functions
2018-07-09 17:30:14 +03:00
Dmitry Stogov
67b4c3379a
Uze ZVAL_COPY_DEREF() instead of ZVAL_DEREF() and ZVAL_COPY()
2018-07-09 12:46:46 +03:00
Dmitry Stogov
af341213f7
se zval_ptr_dtor_str() instead of zend_string_release_ex(Z_STR(*), 0)
2018-07-04 12:08:07 +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
7f67513ca3
Lazy function copying from op_cache SHM into process memory
2018-06-25 19:53:58 +03:00
Nikita Popov
2543e61aed
Fixed bug #76509
...
In PHP static properties are shared between inheriting classes,
unless they are explicitly overwritten. However, because this
functionality was implemented using reference, it was possible
to break the implementation by reassigning the static property
reference.
This is fixed by switching the implementation from using references
to using INDIRECTs, which cannot be affected by userland code.
2018-06-25 15:04:09 +02:00
Dmitry Stogov
34e58a6447
Reduced overhead of magic method calls (__get/__set/__unset/__isset/__dectructor/__clone).
2018-06-22 14:29:54 +03:00
Dmitry Stogov
4418d61ca3
Avoid reusing zend_function.common.prototype for magic things (use reserved fields instead).
2018-06-21 13:09:25 +03:00
Dmitry Stogov
f2b4ec4bdc
Export standard object handlers, to avoid indirect access
2018-05-31 11:57:22 +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
a795bd8265
Optimize zend_hash_real_init()
2018-03-23 00:13:45 +03:00
Dmitry Stogov
d7f2dc4ec6
Improve HashTable iterators handling:
...
- Avoid iterators check/update on each HashTable update opration
- Keep position equal (or above) nNumUsed instead of HT_INVALID_IDX
- Fixed iterators handling in array_unshift()
2018-03-22 02:41:49 +03:00
Dmitry Stogov
1af60a2a71
Keep initialized object_handlers structures in read-only memory.
2018-03-14 14:01:45 +03:00
Dmitry Stogov
58880e3fc1
Get rid of IS_OBJ_USE_GUARDS and IS_OBJ_HAS_GUARDS flags
2018-02-27 17:38:56 +03:00
Dmitry Stogov
5e8aa036f2
Access extra data stored in zval through macros
2018-01-23 12:56:22 +03:00
Dmitry Stogov
b3e22da745
Use OBJ_FLAGS() macro to access object flags (even if they are currently stored together with GC_FLAGS)
2018-01-22 15:57:00 +03:00
Dmitry Stogov
6634d5e313
Use HT_FLAGS() macro
2018-01-22 14:58:16 +03:00