cvs: ZendEngine2 / zend_builtin_functions.c
| From: | Thies C. Arntzen | Date: | Mon, 21 Oct 2002 08:48:55 +0000 |
| Subject: | cvs: ZendEngine2 / zend_builtin_functions.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-526@lists.php.net to get a copy of this message | ||
thies Mon Oct 21 04:48:55 2002 EDT
Modified files:
/ZendEngine2 zend_builtin_functions.c
Log:
MFZE1
Index: ZendEngine2/zend_builtin_functions.c
diff -u ZendEngine2/zend_builtin_functions.c:1.153 ZendEngine2/zend_builtin_functions.c:1.154
--- ZendEngine2/zend_builtin_functions.c:1.153 Wed Oct 9 10:21:40 2002
+++ ZendEngine2/zend_builtin_functions.c Mon Oct 21 04:48:55 2002
@@ -1306,6 +1306,7 @@
void **cur_arg_pos = EG(argument_stack).top_element;
void **args = cur_arg_pos;
int arg_stack_consistent = 0;
+ int frames_on_stack = 0;
if (ZEND_NUM_ARGS()) {
WRONG_PARAM_COUNT;
@@ -1316,6 +1317,7 @@
break;
}
args -= *(ulong*)args;
+ frames_on_stack++;
if (args == EG(argument_stack).elements) {
arg_stack_consistent = 1;
@@ -1328,6 +1330,7 @@
/* skip debug_backtrace() */
ptr = ptr->prev_execute_data;
cur_arg_pos -= 2;
+ frames_on_stack--;
array_init(return_value);
@@ -1370,8 +1373,9 @@
}
if ((! ptr->opline) || ((ptr->opline->opcode == ZEND_DO_FCALL_BY_NAME) ||
(ptr->opline->opcode == ZEND_DO_FCALL))) {
- if (arg_stack_consistent) {
+ if (arg_stack_consistent && (frames_on_stack > 0)) {
add_assoc_zval_ex(stack_frame, "args", sizeof("args"),
debug_backtrace_get_args(&cur_arg_pos TSRMLS_CC));
+ frames_on_stack--;
}
}
} else {