Dmitry Stogov
d481d495cc
Fixed few inconsistent ZVALs in AST produced by compiler (REFCOUNTED and INTERNED strings)
2017-11-01 01:10:21 +03:00
Nikita Popov
5b044aacbe
Use known strings for reflection properties
2017-10-31 15:46:55 +01:00
Dmitry Stogov
b84cbefa94
Change checks that should be always true into ZEND_ASSERT() (some edge cases may be trapped here).
2017-10-31 15:41:51 +03:00
Dmitry Stogov
54ebab9640
Workaroud for inconsistent ZVALs in AST produced by compiler (strings may be REFCOUNTED and INTERNED at the same time).
2017-10-31 15:39:39 +03:00
Dmitry Stogov
5dbdc382af
Intern file names and class constants in first place (they may be interned later during constant substitution)
2017-10-31 15:36:55 +03:00
Dmitry Stogov
2e83924682
Added zend_hash_add_new_mem/zend_hash_str_add_new_mem. Use them to add new elements into PCRE cache (we checked the existance before).
2017-10-31 10:43:10 +03:00
Dmitry Stogov
6de54703f0
Improved zend_hash_str_add/update functions
2017-10-31 10:35:28 +03:00
Dmitry Stogov
974a8f8ad2
Use internet strings for EG(ini_entries)
2017-10-31 02:16:46 +03:00
Dmitry Stogov
8482a6f511
Fixed use-after free introduced in fcc08ce19f
2017-10-31 01:20:38 +03:00
Nikita Popov
02d6c259b9
Fix gc_029_zts.phpt test
...
ZTS and NTS now behave the same here, so reduce this back to a
single test.
2017-10-30 23:05:53 +01:00
Nikita Popov
7b16205f8b
Remove some unnecessary duplications
2017-10-30 22:48:20 +01:00
Nikita Popov
cb2884679c
Remove zend_get_parameters(_ex) APIs
...
zend_get_parameters_ex() has been marked as deprecated for a long
time already. What zend_get_paramers() does is even more
questionable under PHP7. Both functions are obsoleted by the ZPP
mechanism, so I'm dropping them.
2017-10-30 22:00:42 +01: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
b1b1a0596f
ws
2017-10-30 12:56:08 +03:00
Dmitry Stogov
fad75a54d4
Merge branch 'master' into rc_debug
...
* master: (26 commits)
Better fix for bug #75451 (Assertion fails while foreach on empty xpath query)
Catch with the latest AppVeyor unzip errors
Fixed type inference
Fix bug #75453 Incorrect reflection on ibase_connect and ibase_pconnect
Fix compiler warnings
We don't use a specific model for a MAKERNOTE so remove these checks that doesn't do anything anyway
Remove these old comments, as for the TODO, there is already a FR for this
Re-enable AppVeyor cache
make sure run-tests reports exit status upon prerequisite error
Remove implicit constants from test case
Fix invalid read in zend_use_undefined_constant()
Fix invalid read in mb_ord()
Remove --with-libmbfl configure option
Fixed bug #75451 (Assertion fails while foreach on empty xpath query)
Add tests for UConverter::getStandards()
convert spaces to tabs in ext/ftp/tests/server.inc
Add tests for ftp_rename
Fix bug #75434 Wrong reflection for mysqli_fetch_all function
Don't optimize input arrays with suffix holes
Fix bug #75307 Wrong reflection for openssl_open function
...
2017-10-30 12:11:35 +03:00
Nikita Popov
10900a89ad
Fix invalid read in zend_use_undefined_constant()
2017-10-28 16:55:23 +02:00
Dmitry Stogov
8203a0668d
Merge branch 'master' into rc_debug
...
* master:
Use per-request heap instead of system one
Extend zend_register_class_alias_ex() with additional argument to allow creating persistent or per-request aliases
Makrk persistent resources and references with GC_PERSISTENT flag
2017-10-27 14:59:09 +03:00
Dmitry Stogov
cf67a421e9
Use per-request heap instead of system one
2017-10-27 14:45:54 +03:00
Dmitry Stogov
8e01026b82
Extend zend_register_class_alias_ex() with additional argument to allow creating persistent or per-request aliases
2017-10-27 14:44:21 +03:00
Dmitry Stogov
0136ecb69a
Makrk persistent resources and references with GC_PERSISTENT flag
2017-10-27 14:42:06 +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
1ab0d820da
Reverted constant related change (this should be handled togrther with ohter constant related places)
2017-10-26 22:43:45 +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
25d988e91a
Merge branch 'PHP-7.1' into PHP-7.2
...
* PHP-7.1:
Backport tests
2017-10-26 14:12:45 +03:00
Dmitry Stogov
d3146889ab
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Backport tests
2017-10-26 14:12:33 +03:00
Dmitry Stogov
502cfddf28
Backport tests
2017-10-26 14:12:08 +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
Dmitry Stogov
886d4d9ca1
Avoid reallocations when concatenate with empty string
2017-10-26 09:45:02 +03:00
Xinchen Hui
d00c2279af
Merge branch 'PHP-7.2'
...
* PHP-7.2:
Fixed test
2017-10-26 10:24:06 +08:00
Xinchen Hui
887ae8a380
Merge branch 'PHP-7.1' into PHP-7.2
...
* PHP-7.1:
Fixed test
2017-10-26 10:24:00 +08:00
Xinchen Hui
6b637ac589
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Fixed test
2017-10-26 10:23:52 +08:00
Xinchen Hui
eaeccc1d99
Fixed test
2017-10-26 10:23:43 +08: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
da1f8097fa
Zend MM related tunning.
2017-10-26 00:25:31 +03:00
Dmitry Stogov
6e1ee94744
Reduce smart_string related reallocations and make them Zend MM friendly.
2017-10-25 19:04:16 +03:00
Dmitry Stogov
6a034be2c6
Fixed signed/unsigned comparisons
2017-10-25 11:45:17 +03:00
Dmitry Stogov
9cf87aa196
Avoid HashTable allocations for empty arrays (using zend_empty_array).
2017-10-24 17:27:31 +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
Anatol Belski
793ca716fb
Fix datatypes and compiler warnings
...
Switch to size_t
Not critical as an unsigned is already used, but fixes a couple of
warnings in other areas.
Normalize signature
It's a function with the usual compare semantics, returning a platform
specific at least produces unnecessary warnings elsewhere and is otherwise
inappropriate.
Fix return value
Drop unused var
Fix compiler warnings
Fix compiler warning
Fix var name in arginfo
Fix cast
2017-10-23 08:56:57 +02:00
Anatol Belski
efcce55360
Fix datatype
2017-10-19 10:26:39 +02:00
Dmitry Stogov
272f5a1716
Extend zend_string API to avoid reallocation in zend_string_init_interned()
2017-10-19 00:02:56 +03:00
Dmitry Stogov
b4903aef16
Move a part of opcache initialization into post_startup phase (when all extensions already loaded).
2017-10-18 17:18:54 +03:00
Dmitry Stogov
801b467c73
Added test
2017-10-17 13:45:46 +03:00
Dmitry Stogov
d0f4dbfd96
Make assertions in DO_ICALL and CALL_TRAMPOLINE to be consistent with DO_FCALL.
2017-10-17 13:35:59 +03:00
Dmitry Stogov
61ef91bf0d
Revert "Allow internal functions to return values by reference (this was disabled in implementation of DO_ICALL, but enabled in DO_FCALL)."
...
This reverts commit da781a5ac2
.
2017-10-17 13:25:19 +03:00
Dmitry Stogov
da781a5ac2
Allow internal functions to return values by reference (this was disabled in implementation of DO_ICALL, but enabled in DO_FCALL).
...
However, don't require internal functions returning by reference to return a reference.
Mark unserialize() as returning by reference and remove unwrap_reference hack, to allow proper returning of self referenced arrays using a reference.
Currently unserialize() is the only internal function that may return a reference.
2017-10-17 11:50:34 +03:00
Dmitry Stogov
b9f9d44b52
Merge branch 'PHP-7.2'
...
* PHP-7.2:
Fixed bug #75368 (mmap/munmap trashing on unlucky allocations)
2017-10-13 14:02:16 +03:00
Dmitry Stogov
7045362ce7
Merge branch 'PHP-7.1' into PHP-7.2
...
* PHP-7.1:
Fixed bug #75368 (mmap/munmap trashing on unlucky allocations)
2017-10-13 14:00:21 +03:00
Dmitry Stogov
bf1c1d07db
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Fixed bug #75368 (mmap/munmap trashing on unlucky allocations)
2017-10-13 13:56:23 +03:00
Dmitry Stogov
397f5cb687
Fixed bug #75368 (mmap/munmap trashing on unlucky allocations)
2017-10-13 13:56:06 +03:00
Nikita Popov
e688d1df99
Fix gc_032.phpt
...
Use var_dump instead of debug_zval_dump. The refcounts are not
important for this test and change depending on whether opcache
is loaded or not.
2017-10-13 11:59:28 +02:00
Dmitry Stogov
7a23c575f2
Merge branch 'develop_operators' of github.com:tianhe1986/php-src
...
* 'develop_operators' of github.com:tianhe1986/php-src:
`memcmp` begins from the second char.
2017-10-13 11:39:42 +03:00
tianhe1986
e6519cb69d
memcmp
begins from the second char.
...
Signed-off-by: tianhe1986 <w1s2j3229@163.com>
2017-10-12 22:46:26 +08:00
Dmitry Stogov
edc7c8ccfa
PHP must not create circular arrays when element is assigned by value.
2017-10-12 16:23:45 +03:00
Dmitry Stogov
4960c41e1f
Small improvement with zend_memnstr (tianhe1986)
2017-10-12 11:54:40 +03:00
Anatol Belski
be62d5fc19
Merge branch 'PHP-7.2'
...
* PHP-7.2:
Fix datatype
2017-10-11 09:00:32 +02:00
Anatol Belski
53169dc480
Fix datatype
2017-10-11 08:58:59 +02:00
Dmitry Stogov
97e7521e49
AST don't have to be COPYABLE anymore.
2017-10-10 15:45:03 +03:00
Dmitry Stogov
dec8b787ee
Renumber types and type_flags
2017-10-10 11:10:27 +03:00
Dmitry Stogov
ef5ea48741
Always use IS_CONSTANT_AST (IS_CONSTANT is removed).
2017-10-10 10:11:05 +03:00
Dmitry Stogov
39ded1d5f8
Changed zend_ast_ref structure to use only one allocation, removing dichotomy between heap/arena ASTs.
2017-10-09 16:57:51 +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
f18638ca2d
Fixed incorrect recursion detection
2017-10-06 11:47:11 +03:00
Dmitry Stogov
254b74b85f
HASH_FLAG_PERSISTENT renamed into IS_ARRAY_PERSISTENT and moved into GC_FLAGS (to be consistent with IS_STR_PERSISTENT).
2017-10-06 02:54:14 +03:00
Dmitry Stogov
cb9d81ef4f
Refactored recursion pretection
2017-10-06 01:34:50 +03:00
Dmitry Stogov
0b87d4bf29
Removed unused flags
2017-10-05 00:04:59 +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
879126a2ce
Don't pass useless arguments
2017-10-03 15:24:02 +03:00
Andrea Faulds
1189fe5729
Merge branch 'PHP-7.2'
2017-09-29 21:40:04 +01:00
Andrea Faulds
15efa985df
Merge branch 'PHP-7.1' into PHP-7.2
2017-09-29 21:38:52 +01:00
Andrea Faulds
4372293192
Merge branch 'PHP-7.0' into PHP-7.1
2017-09-29 21:38:30 +01:00
Andrea Faulds
abefb6dfe7
Fix bug #75290
2017-09-29 21:38:08 +01:00
Sara Golemon
8d90c3a7fb
Merge branch 'PHP-7.2'
...
* PHP-7.2:
Fix word alignment on ILP64.
2017-09-28 10:48:53 -04:00
Sara Golemon
a93fe32c1a
Merge branch 'PHP-7.1' into PHP-7.2
...
* PHP-7.1:
Fix word alignment on ILP64.
2017-09-28 10:48:43 -04:00
Sara Golemon
b5bc88c64e
Fix word alignment on ILP64.
2017-09-28 10:45:51 -04:00
Joe Watkins
e2e3c981b5
Merge branch 'PHP-7.2'
...
* PHP-7.2:
Fixed #75220 - Segfault when calling is_callable on parent
2017-09-27 06:09:24 +01:00
Joe Watkins
0d6c56a8ea
Merge branch 'PHP-7.1' into PHP-7.2
...
* PHP-7.1:
Fixed #75220 - Segfault when calling is_callable on parent
2017-09-27 06:08:49 +01:00
Joe Watkins
2dd77456fe
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Fixed #75220 - Segfault when calling is_callable on parent
2017-09-27 06:08:01 +01:00
Nester
a680d701ce
Fixed #75220 - Segfault when calling is_callable on parent
2017-09-27 06:07:24 +01:00
Xinchen Hui
ac3c586ca7
Merge branch 'PHP-7.2'
...
* PHP-7.2:
Update NEWS
Update NEWS
Fixed bug #75241 (Null pointer dereference in zend_mm_alloc_small()).
Compiler warning
2017-09-24 17:25:26 +08:00
Xinchen Hui
bad5639386
Merge branch 'PHP-7.1' into PHP-7.2
...
* PHP-7.1:
Update NEWS
Fixed bug #75241 (Null pointer dereference in zend_mm_alloc_small()).
Compiler warning
2017-09-24 17:24:57 +08:00
Xinchen Hui
e8c200515a
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Fixed bug #75241 (Null pointer dereference in zend_mm_alloc_small()).
Compiler warning
2017-09-24 17:24:23 +08:00
Xinchen Hui
b05ff14a9a
Fixed bug #75241 (Null pointer dereference in zend_mm_alloc_small()).
2017-09-24 17:24:11 +08:00
Nikita Popov
18e297d3dd
Merge branch 'PHP-7.2'
2017-09-24 08:55:28 +02:00
Nikita Popov
76b2b4a190
Merge branch 'PHP-7.1' into PHP-7.2
2017-09-24 08:55:12 +02:00
Nikita Popov
628c257f71
Merge branch 'PHP-7.0' into PHP-7.1
2017-09-24 08:54:36 +02:00
Nikita Popov
73d6456d7d
Fixed bug #75252
2017-09-24 08:53:27 +02:00