summaryrefslogtreecommitdiff
path: root/Zend/zend_execute.c
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2016-08-16 23:50:42 -0700
committerStanislav Malyshev <stas@php.net>2016-08-16 23:50:42 -0700
commitf8a75d4eee3446fb5c5c493b28b9ee80e34041cc (patch)
tree248201271bc3cd256f53efb4169d07d2af27ae6a /Zend/zend_execute.c
parente3829b88694460a2e5af10ad5eee9966fa55e589 (diff)
parentae3782a0db8b1e7c2a8665949cc3316227c61643 (diff)
downloadphp-git-f8a75d4eee3446fb5c5c493b28b9ee80e34041cc.tar.gz
Merge branch 'PHP-7.0' into PHP-7.0.10
* PHP-7.0: (34 commits) Fix URL rewriter partially Support "git worktree" Add NEWS Fix ASSERT logic Bugfix 72791: fix memory leak in PDO persistent connections Don't copy mime types in CLI server Remove obsolete Id tags Bump version in OCI8 test Fixed bug #72788 (Invalid memory access when using persistent PDO connection) Remove typo'd commit Fix bug 72788: Invalid memory access when database_object_handle is undefined. Also fix memory leak in dbh_free when using persistent PDO connections. Replace dead branch with ZEND_ASSERT() Add test for bug #69107: finfo no longer detects PHP files Fix bug #55451 Fix stream_socket_enable_crypto() test Remove old $Id$ tags Sync with 7.1 branch changes from Nikita & Dimitri to keep OCI8 code identical Fix bug #72524 (Binding null values triggers ORA-24816 error) Fix the fix (Nikita), thanks! Check the return value of dbconvert() in mssql_guid_string(), as it may return -1 in case the conversion failed. In that case false is returned. ... Conflicts: ext/standard/ftp_fopen_wrapper.c
Diffstat (limited to 'Zend/zend_execute.c')
-rw-r--r--Zend/zend_execute.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index af90b442f0..1012b3cc4f 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -145,7 +145,8 @@ static const zend_internal_function zend_pass_function = {
((ZEND_VM_STACK_PAGE_SLOTS(gen) - ZEND_VM_STACK_HEADER_SLOTS) * sizeof(zval))
#define ZEND_VM_STACK_PAGE_ALIGNED_SIZE(gen, size) \
- (((size) + (ZEND_VM_STACK_FREE_PAGE_SIZE(gen) - 1)) & ~(ZEND_VM_STACK_PAGE_SIZE(gen) - 1))
+ (((size) + ZEND_VM_STACK_HEADER_SLOTS * sizeof(zval) \
+ + (ZEND_VM_STACK_PAGE_SIZE(gen) - 1)) & ~(ZEND_VM_STACK_PAGE_SIZE(gen) - 1))
static zend_always_inline zend_vm_stack zend_vm_stack_new_page(size_t size, zend_vm_stack prev) {
zend_vm_stack page = (zend_vm_stack)emalloc(size);
@@ -822,11 +823,8 @@ static zend_always_inline int zend_verify_arg_type(zend_function *zf, uint32_t a
} else {
ce = zend_verify_arg_class_kind(cur_arg_info);
if (UNEXPECTED(!ce)) {
- if (Z_TYPE_P(arg) == IS_OBJECT) {
- zend_verify_arg_error(zf, arg_num, "be an instance of ", ZSTR_VAL(cur_arg_info->class_name), "instance of ", ZSTR_VAL(Z_OBJCE_P(arg)->name), arg);
- } else {
- zend_verify_arg_error(zf, arg_num, "be an instance of ", ZSTR_VAL(cur_arg_info->class_name), "", zend_zval_type_name(arg), arg);
- }
+ ZEND_ASSERT(Z_TYPE_P(arg) != IS_OBJECT);
+ zend_verify_arg_error(zf, arg_num, "be an instance of ", ZSTR_VAL(cur_arg_info->class_name), "", zend_zval_type_name(arg), arg);
return 0;
}
*cache_slot = (void*)ce;