Xinchen Hui
11a4b57e61
Merge branch 'PHP-7.1' into PHP-7.2
...
* PHP-7.1:
Update NEWS
Fixed bug #75420 (Crash when modifing property name in __isset for BP_VAR_IS)
2017-10-26 10:09:57 +08:00
Xinchen Hui
3c4c9a23bc
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Fixed bug #75420 (Crash when modifing property name in __isset for BP_VAR_IS)
Conflicts:
Zend/zend_object_handlers.c
2017-10-26 10:08:39 +08:00
Xinchen Hui
d2047503cb
Fixed bug #75420 (Crash when modifing property name in __isset for BP_VAR_IS)
2017-10-26 10:07:08 +08:00
Dmitry Stogov
6a034be2c6
Fixed signed/unsigned comparisons
2017-10-25 11:45:17 +03:00
Dmitry Stogov
59a7944bc6
Made run_time_cache to keep "offset" to dynamic properties Buckets (instead of index).
2017-10-24 10:28:19 +03:00
Dmitry Stogov
917dfe646e
Removed useless reference-counting and copying
2017-10-23 21:07:49 +03:00
Dmitry Stogov
193adbdf30
Use run-time cache to keep position of dynamic properties in HashTable to access them without hash lookup.
2017-10-23 18:29:13 +03:00
Dmitry Stogov
f18638ca2d
Fixed incorrect recursion detection
2017-10-06 11:47:11 +03:00
Dmitry Stogov
cb9d81ef4f
Refactored recursion pretection
2017-10-06 01:34:50 +03:00
Dmitry Stogov
44e0b79ac6
Refactored array creation API. array_init() and array_init_size() are converted into macros calling zend_new_array(). They are not functions anymore and don't return any values.
2017-09-20 02:25:56 +03:00
Dmitry Stogov
0fb05f1487
Property access micro-optimization. (ZEND_WRONG_PROPERTY_OFFSET and ZEND_DYNAMIC_PROPERTY_OFFSET are hidden, use one comparison instead of two on fast paths. "Negative" offsets are reserved for future optimizations).
2017-09-18 13:13:24 +03:00
Anatol Belski
bc5811f361
further sync for vim mode lines
2017-07-04 18:12:45 +02:00
Nikita Popov
3a890180d3
Merge branch 'PHP-7.1'
2017-04-02 13:31:07 +02:00
Nikita Popov
fe46a7da78
Fixed bug #74340
2017-04-02 13:30:35 +02:00
Anatol Belski
c698299550
Interned strings unification for TS/NTS
...
Hereby, interned strings are supported in thread safe PHP. The patch
implements two types of interned strings
- interning per process, strings are not freed till process end
- interning per request, strings are freed at request end
There is no runtime interning.
With Opcache, all the permanent iterned strings are copied into SHM on
startup, additional copying into SHM might happen on demand.
2017-03-04 10:39:13 +01:00
Sara Golemon
1a84ecaca5
Remove unused variable
2017-02-03 06:17:37 -08:00
Dmitry Stogov
eac0b2e98f
Check for old style constructor only if method is not found
2017-01-23 14:54:58 +03:00
Sammy Kaye Powers
dac6c639bb
Update copyright headers to 2017
2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
478f119ab9
Update copyright headers to 2017
2017-01-04 11:14:55 -06:00
Sammy Kaye Powers
9e29f841ce
Update copyright headers to 2017
2017-01-02 09:30:12 -06:00
Dmitry Stogov
3e9bb03a62
Removed IS_TYPE_IMMUTABLE (it's the same as COPYABLE & !REFCOUED)
2016-11-28 22:59:57 +03:00
Xinchen Hui
f33bfd4e44
Merge branch 'PHP-7.1'
...
* PHP-7.1:
Update NEWS
Fix memory leak(null coalescing operator with Spl hash)
2016-11-21 11:46:13 +08:00
Xinchen Hui
270f9a0216
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Update NEWS
Fix memory leak(null coalescing operator with Spl hash)
2016-11-21 11:46:03 +08:00
Tyson Andre
cdb7aafc23
Fix memory leak(null coalescing operator with Spl hash)
...
The SEPARATE_ARG_IF_REF macro increased the refcount of the object passed as a
key.
However, when the key did not exist in the ArrayAccess implementation,
the code returned early without trying to decrement the refcount.
Add a test of `??` succeeding+failing on a SplObjectStorage instance.
2016-11-20 15:46:13 -08:00
Nikita Popov
0806bb39ef
Cleanup zend_std_call_setter
...
__set() does not use the return value to indicate success, and at
this point I doubt it ever will.
2016-10-29 15:15:34 +02:00
Joe Watkins
6091873d4a
Revert "Fixed bug #73067 (__debugInfo crashes when throwing an exception)"
...
This reverts commit 2d8ab51576
.
2016-10-17 14:22:55 +01:00
Anatol Belski
d103a41679
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
followup with #73276 merge
fix test
Fix bug #73276 - crash in openssl_random_pseudo_bytes function
Fix bug #73293 - NULL pointer dereference in SimpleXMLElement::asXML()
Fix for #73240 - Write out of bounds at number_format
avoid strlen
Bug #73218 : add mitigation for ICU int overflow
Add more locale length checks, due to ICU bugs.
Fix bug #73150 : missing NULL check in dom_document_save_html
Clear FG(user_stream_current_filename) when bailing out
set versions and release date
sync NEWS
Revert "Fixed bug #73067 (__debugInfo crashes when throwing an exception)"
Fix for #73240 - Write out of bounds at number_format
Fix bug #73257 and bug #73258 - SplObjectStorage unserialize allows use of non-object as key
set versions
Fix bug #73091 - Unserializing DateInterval object may lead to __toString invocation
2016-10-12 16:06:11 +02:00
Anatol Belski
8c9f639a1d
Revert "Fixed bug #73067 (__debugInfo crashes when throwing an exception)"
...
This reverts commit 2d8ab51576
.
2016-10-11 11:24:08 +02:00
Xinchen Hui
a339523fe5
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Fixed bug #73067 (__debugInfo crashes when throwing an exception)
2016-09-13 10:59:09 +08:00
Xinchen Hui
2d8ab51576
Fixed bug #73067 (__debugInfo crashes when throwing an exception)
2016-09-13 10:58:57 +08:00
Xinchen Hui
dd618664a0
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Fixed bug #72813 (Segfault with __get returned by ref)
Fix URL rewriter partially
Conflicts:
Zend/zend_object_handlers.c
ext/standard/url_scanner_ex.c
ext/standard/url_scanner_ex.re
2016-08-12 16:35:41 +08:00
Xinchen Hui
e03480bfab
Fixed bug #72813 (Segfault with __get returned by ref)
...
This should be safe change, as we don't dereference value and member
after calling setter/getter.
And compare to adding unref codes, this is much cheaper.
2016-08-12 16:24:46 +08: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
674297c7e4
Allow empty property names
...
Conflicts:
Zend/zend_compile.c
2016-05-24 18:34:17 +02:00
Dmitry Stogov
e9c3f9fcde
Fixed bug #72177 (Scope issue in __destruct after ReflectionProperty::setValue())
2016-05-13 11:55:09 +03:00
Dmitry Stogov
7b94b958cc
Intern some known (and offten used) strings.
2016-05-12 13:47:22 +03:00
Xinchen Hui
455eabcd2c
Merge branch 'PHP-7.0'
2016-05-07 00:08:35 -07:00
Xinchen Hui
29079f263e
Strlen cleanup (additions for previous one fix)
...
Probably compilers will do similar optimization
2016-05-07 00:08:15 -07:00
Dmitry Stogov
c19cb70dac
Revert "Refactor zval cleanup into single function"
...
This reverts commit bac6fdb0c5
.
2016-05-06 10:47:58 +03:00
Bob Weinand
bac6fdb0c5
Refactor zval cleanup into single function
...
Also use zval_ptr_dtor_nogc() everywhere in Zend in favor of zval_dtor()
2016-05-05 23:31:57 +02:00
Joe Watkins
9ad40d8d36
This function needs to be exported for extensions that implement complex zend objects
2016-04-30 06:48:47 +01:00
Nikita Popov
357ee4305e
Fix leak in guards patch
2016-04-28 19:20:51 +02:00
Dmitry Stogov
6499162ff0
- get rid of EG(scope). zend_get_executed_scope() should be used instead.
...
- ichanged zval_update_constant_ex(). Use IS_TYPE_IMMUTABLE flag on shared constants and AST, instead of "inline_change" parameter.
2016-04-28 04:13:34 +03:00
Dmitry Stogov
e88c71d356
Optimize property guards for the most usual case with only one acive guard.
2016-04-27 00:24:20 +03:00
Joe Watkins
373da7aa6f
fix standard object handler for properties when type == BP_VAR_IS
2016-03-26 11:15:08 +00:00
Joe Watkins
6f28956428
fix standard object handler for properties when type == BP_VAR_IS
2016-03-26 10:43:56 +00:00
Nikita Popov
a175aa9dca
Fixed bug #71731
...
The read_dimension() handler in BP_VAR_IS mode will now call
offsetExists() before caling offsetGet(). This has always been a
problem, however recently the issue has been exacerbated, because
the null-coalesce operator ?? makes it visible for non-nested
array accesses.
Also fixes #69659 .
2016-03-20 13:35:00 +01:00
Nikita Popov
1f6d27d3d2
Fix use of UNDEF instead of NULL in read_dimension
2016-03-20 13:33:17 +01:00
Dmitry Stogov
6039d2d914
Fixed bug #71474 (Crash because of VM stack corruption on Magento2).
2016-01-28 11:41:15 +03:00
Xinchen Hui
97a9470d97
bump year which is missed in rev 49493a2
2016-01-02 17:56:11 +08:00