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
Xinchen Hui
9397f52724
Fixed Bug #70967 (Weird error handling for __toString when Error is thrown)
2015-11-28 23:38:19 -08:00
Xinchen Hui
2d8d97cee2
Fixed bug #70873 (Regression on private static properties access)
2015-11-07 06:50:36 -08:00
Nikita Popov
c25e81ab7b
Remove dead assignment in get_property_guard
2015-10-01 16:28:28 +02:00
Dmitry Stogov
927d68db24
Avoid reallocations
2015-09-14 23:04:27 +03:00
Xinchen Hui
66643f6192
Use efree_size
2015-09-10 16:22:07 +08:00
Xinchen Hui
7a0e68b97c
Unexpected
2015-09-10 14:57:22 +08:00
Xinchen Hui
6852f9cd43
cleanup tmp_member handling
2015-09-10 14:39:25 +08:00
Dmitry Stogov
37f0c6b5cb
Add myself into list of authors of the most refactored files.
2015-08-31 11:38:16 +03:00
Dmitry Stogov
25f9e25526
Fixed bug #70187 (Notice: unserialize(): Unexpected end of serialized data)
2015-08-26 03:27:05 +03:00
Dmitry Stogov
71af54e5f6
Mark error and exception functions as "cold" (Matt's idea)
2015-08-19 14:40:56 +03:00
Aaron Piotrowski
5df893ce3c
Use NULL where possible for exception class
...
Matches usage of zend_throw_exception()/zend_throw_exception_ex().
2015-07-07 12:10:55 -05:00
Aaron Piotrowski
22c38b2ef5
Remove need to pass error level
2015-07-03 17:53:41 -05:00
Aaron Piotrowski
5a99c07ecc
Enable throwing custom exceptions from errors
2015-07-03 17:53:40 -05:00