Commit Graph

469 Commits

Author SHA1 Message Date
Nikita Popov
182317f6b6 Remove unnecessary type check 2017-12-25 21:21:05 +01:00
Nikita Popov
2667ddc46d Remove unnecessary readobj==writeobj checks
This can no longer be the case since PHP 7. The writeobj must
always point to a different zval.
2017-12-25 21:19:45 +01:00
Xinchen Hui
4dfbfe93aa Use cheaper API 2017-12-18 11:55:14 +08:00
Dmitry Stogov
6a9d2b2190 Cleanup type conversion 2017-12-07 19:24:55 +03:00
Dmitry Stogov
74c84cd7f0 Use zend_string_equal*() API for zend_string equality check instead of direct memcmp() usage. 2017-12-04 17:17:02 +03:00
Xinchen Hui
60c742979d Merge branch 'PHP-7.2'
* PHP-7.2:
  Update NEWS
  Fixed bug #75573 (Segmentation fault in 7.1.12 and 7.0.26)
  Revert "ext/sodium: pwhash: do not warn on low parameters"

Conflicts:
	Zend/zend_object_handlers.c
2017-11-29 14:54:05 +08:00
Xinchen Hui
bedf6093ad Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #75573 (Segmentation fault in 7.1.12 and 7.0.26)
2017-11-29 14:46:44 +08:00
Xinchen Hui
3b9ba7b6bd Fixed bug #75573 (Segmentation fault in 7.1.12 and 7.0.26) 2017-11-29 14:46:21 +08:00
Dmitry Stogov
ccc12b82da Avoid unnecessary reference-counting on strings. 2017-11-16 17:09:32 +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
aeca761856 Removed useless reallocations 2017-10-26 19:13:53 +03:00
Dmitry Stogov
0366684ce3 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed indirect modification of magic ArrayAccess method arguments
2017-10-26 16:17:49 +03:00
Dmitry Stogov
1d846fdfb2 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed indirect modification of magic ArrayAccess method arguments
2017-10-26 16:07:49 +03:00
Dmitry Stogov
503df277ab Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed indirect modification of magic ArrayAccess method arguments
2017-10-26 16:04:20 +03:00
Dmitry Stogov
98eee90734 Fixed indirect modification of magic ArrayAccess method arguments 2017-10-26 16:03:42 +03:00
Dmitry Stogov
0772b32ef6 Restore object copying on magic method calls (It was removed in master only). 2017-10-26 14:04:42 +03:00
Dmitry Stogov
b09e398304 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed indirect modification of magic method arguments.
2017-10-26 13:35:39 +03:00
Dmitry Stogov
e3997b2c82 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed indirect modification of magic method arguments.
2017-10-26 13:12:52 +03:00
Dmitry Stogov
177cdcf313 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed indirect modification of magic method arguments.
2017-10-26 13:11:59 +03:00
Dmitry Stogov
bc59289b7a Fixed indirect modification of magic method arguments. 2017-10-26 13:05:23 +03:00
Xinchen Hui
5cb5b27c40 Merge branch 'PHP-7.2'
* PHP-7.2:
  Update NEWS
  Update NEWS
  Fixed bug #75420 (Crash when modifing property name in __isset for BP_VAR_IS)

Conflicts:
	Zend/zend_object_handlers.c
2017-10-26 10:16:55 +08:00
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