Dmitry Stogov
8fa691ea8a
Revert "Fix a few valgrind warnings with undefing result"
...
This reverts commit 8f4e100f21
.
2016-12-02 11:58:25 +03:00
Bob Weinand
8f4e100f21
Fix a few valgrind warnings with undefing result
2016-12-01 10:15:07 +01:00
Bob Weinand
9ad9d7ae37
Fix return value memory leaks upon exceptions in opcode operand freeing
2016-11-30 17:44:34 +01:00
Dmitry Stogov
1ab44223bf
Export zend_do_fcall_overloaded()
2016-11-22 18:36:27 +03:00
Dmitry Stogov
653c9e1fa2
Merge branch 'PHP-7.1'
...
* PHP-7.1:
Removed useless (double) checks for EG(exception). (Bob)
2016-11-22 11:51:42 +03:00
Dmitry Stogov
8d70b04a1c
Removed useless (double) checks for EG(exception). (Bob)
2016-11-22 11:50:48 +03:00
Dmitry Stogov
68ee168c75
Merge branch 'PHP-7.1'
...
* PHP-7.1:
Fixed memory leak (Bob)
2016-11-22 11:23:17 +03:00
Dmitry Stogov
db5bbe94be
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Fixed memory leak (Bob)
2016-11-22 11:22:55 +03:00
Dmitry Stogov
63ea4d194b
Fixed memory leak (Bob)
2016-11-22 11:22:10 +03:00
Dmitry Stogov
d6c332eb51
Turn IS_TYPE_COLLECTABLE zval flag into GC_COLLECTABLE zend_refcounted flag.
...
This simplifies checks and allows reset this flag for "acyclic" arrays and objects.
2016-10-21 17:47:30 +03:00
Dmitry Stogov
3e0e404173
Merge branch 'PHP-7.1'
...
* PHP-7.1:
zval_dtor_func_for_ptr() -> zval_dtor_func()
2016-09-29 11:00:13 +03:00
Dmitry Stogov
53c0a04185
zval_dtor_func_for_ptr() -> zval_dtor_func()
2016-09-29 10:59:54 +03:00
Dmitry Stogov
02a6c3a343
Merge branch 'PHP-7.1'
...
* PHP-7.1:
Better fix for bug #72854 (avoid extra copy and creating reference to stack variable)
2016-09-29 10:57:39 +03:00
Dmitry Stogov
8863ca76e6
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Better fix for bug #72854 (avoid extra copy and creating reference to stack variable)
2016-09-29 10:57:09 +03:00
Dmitry Stogov
e7f4355d9b
Better fix for bug #72854 (avoid extra copy and creating reference to stack variable)
2016-09-29 10:56:01 +03:00
Dmitry Stogov
97628da24a
Expose information about calls to "fake" closures (created through ReflectionFunction::getClosure), to allow extra specialization of RETRUN opcode handler.
2016-09-26 17:44:28 +03:00
Nikita Popov
daa2b75c76
Fix some sizeof(zend_long) > sizeof(size_t) issues
...
Fix a couple of mistakes that are only relevant if
sizeof(zend_long) > sizeof(size_t).
* Fix cast order in string offset check: Negation should happen
after the (zend_long) cast, otherwise sign extension does not
occur.
* Use Z_UL in zend_inference.
* Use aligned size for HT_USED_SIZE in zend_persist: The issue is
that on x86-32 uint64_t is considered to be 4-aligned, so the
alignment assumption does not hold.
2016-09-05 15:33:02 +02:00
Davey Shafik
12ee17d5e0
Implement \ArgumentCountError exception
2016-08-30 19:35:56 -07:00
Xinchen Hui
557f1ccf0c
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Fixed bug #72943 (assign_dim on string doesn't reset hval)
Conflicts:
Zend/zend_execute.c
2016-08-26 18:32:54 +08:00
Xinchen Hui
c67fa3c91d
Fixed bug #72943 (assign_dim on string doesn't reset hval)
2016-08-26 18:30:08 +08:00
Xinchen Hui
e849e65d89
This is unecessary for 7.1 (IS_ERROR is an internal type)
2016-08-21 17:40:10 +08:00
Xinchen Hui
e572035ecf
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Fixed bug #72911 (Memleak in zend_binary_assign_op_obj_helper)
Fixed bug #72907 (null pointer deref, segfault in gc_remove_zval_from_buffer (zend_gc.c:260))
2016-08-21 17:39:52 +08:00
Xinchen Hui
0476bb1de5
Fixed bug #72911 (Memleak in zend_binary_assign_op_obj_helper)
2016-08-21 17:38:03 +08:00
Kalle Sommer Nielsen
447e57a1e1
Fixed 7.1 build, decls first please!
2016-08-17 20:26:32 +02:00
Nikita Popov
7384fcff0a
Merge branch 'PHP-7.0' into PHP-7.1
2016-08-16 21:05:57 +02:00
Nikita Popov
e2230c17d3
Fix bug #72854
2016-08-16 21:05:30 +02:00
Nikita Popov
ba09a520d2
Cleanup parameter/return type checking code
...
a) Extract all the logic for error message formatting into a separate
function that is reused for everything.
b) Extract the logic for whether a value matches a type into two
functions, one for user types, one for internal ones.
This tries to fight the increasing code duplication in the type
checking code, whether everything was repeated at least four times
and parts of the error message handling were repeated in dozens of
branches.
2016-08-16 15:48:33 +02:00
Andrea Faulds
1dab96c1db
Show "or null" in TypeErrors for nullable arg_infos
2016-08-11 18:44:43 +02:00
Andrea Faulds
ab45f13a0b
Merge branch 'PHP-7.0' into PHP-7.1
2016-08-08 21:00:49 +01:00
Andrea Faulds
5358c7cf5e
Replace dead branch with ZEND_ASSERT()
2016-08-08 20:56:11 +01:00
Nikita Popov
3859bcd1f8
Merge branch 'PHP-7.0' into PHP-7.1
2016-08-05 19:56:27 +02:00
Nikita Popov
807e81937b
Fix bug #72767
...
The page size calculation did not account for the size of the
stack header (or rather it did account for it, but in the wrong
direction...)
2016-08-05 19:55:10 +02:00
Nikita Popov
0bda0422af
Merge branch 'PHP-7.0'
...
Conflicts:
Zend/zend_vm_execute.h
2016-07-14 18:39:48 +02:00
Nikita Popov
82ce2a4e4d
Add missing call opcodes in cleanup_unfinished_calls()
...
Otherwise we may leak if an exception is thrown from them.
2016-07-14 18:37:28 +02:00
Nikita Popov
5f6effed43
Add opcodes to zend_wrong_string_offset()
2016-07-10 15:15:34 +02:00
Aaron Piotrowski
d9a9cf8eca
Merge branch 'master' into iterable
2016-07-03 22:42:10 -05:00
Dmitry Stogov
044e2718fe
Fixed executor without global register variales (gcc warnings or clang errors)
2016-06-27 10:36:41 +03:00
Dmitry Stogov
d0460d8f6b
Turn safe timeout handling into general interrupt handling ability.
2016-06-23 15:01:23 +03:00
Dmitry Stogov
1616038698
Added ZEND_ATTRIBUTE_FORMAT to some middind functions.
...
"%p" replaced by ZEND_LONG_FMT to avoid compilation warnings.
Fixed most incorrect use cases of format specifiers.
2016-06-21 16:00:37 +03:00
Dmitry Stogov
ff363e2e7c
Implemented RFC: Replace "Missing argument" warning with "Too few arguments" exception
...
Squashed commit of the following:
commit 8b45fa2acb
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Jun 16 01:52:50 2016 +0300
Separate slow path of ZEND_RECV into a cold function.
commit 9e18895ee5
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jun 15 23:26:28 2016 +0300
Required argument can't be IS_UNDEF anymore.
commit 662db66e39
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue May 31 17:14:50 2016 +0300
Replace "Missing argument" warning by "Too few arguments" exception.
2016-06-16 02:32:02 +03: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
Dmitry Stogov
e7e79aa409
Delay IS_ERROR checks
2016-06-09 12:39:38 +03:00
Nikita Popov
766ad0d970
Followup for bug #53432
...
Assign-ops and nested accesses now get the same treatment.
2016-06-08 15:43:58 +02:00
Aaron Piotrowski
8146c47d85
Fix error message
2016-06-03 18:29:24 -05:00
Aaron Piotrowski
72692e9a9c
Add iterable pseudo-type
2016-06-03 17:42:04 -05:00
Dmitry Stogov
b111da96d9
Split ZEND_SEND_VAR_NO_REF into ZEND_SEND_VAR_NO_REF and ZEND_SEND_VAR_NO_REF_EX (similar to ZEND_SEND_VAL) and remove ZEND_ARG_* flags.
2016-05-31 04:06:00 +03:00
Nikita Popov
91f5940329
Forbid dynamic calls to scope introspection functions
...
Per RFC:
https://wiki.php.net/rfc/forbid_dynamic_scope_introspection
2016-05-24 20:48:24 +02:00
Dmitry Stogov
c466df6813
Inlined fast paths of the freqently execute handlers for FETCH_DIM_R.
2016-05-17 15:08:04 +03:00
Dmitry Stogov
ccf18da450
Eliminated checks for (func->op_array.fn_flags & ZEND_ACC_GENERATOR) in fast path of DO_FCALL* handlers.
...
This slightly improves calls to regular function and method calls in cost of a bit slower generator initialization.
Separate call frame for generators, allocated on heap, now created by ZEND_GENERATOR_CREATE instruction.
2016-05-13 01:40:15 +03:00
Dmitry Stogov
7b94b958cc
Intern some known (and offten used) strings.
2016-05-12 13:47:22 +03:00