diff options
| author | Xinchen Hui <laruence@gmail.com> | 2015-09-22 11:59:35 +0800 |
|---|---|---|
| committer | Xinchen Hui <laruence@gmail.com> | 2015-09-22 11:59:35 +0800 |
| commit | e1dcfd2cf900995fba28866dfb52fa68171d1ab8 (patch) | |
| tree | 9c61b4eeda2322019ffa32cb06f289f2ffd03c66 /Zend/zend_builtin_functions.c | |
| parent | ed5a5bdff88fcbab6208ea396efd6808e00de573 (diff) | |
| download | php-git-e1dcfd2cf900995fba28866dfb52fa68171d1ab8.tar.gz | |
Fixed bug #70547 (unsetting function variables corrupts backtrace)
Diffstat (limited to 'Zend/zend_builtin_functions.c')
| -rw-r--r-- | Zend/zend_builtin_functions.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index e3f087b356..b0e4f6ab02 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -2233,8 +2233,12 @@ static void debug_backtrace_get_args(zend_execute_data *call, zval *arg_array) / if (ZEND_CALL_NUM_ARGS(call) > first_extra_arg) { while (i < first_extra_arg) { - if (Z_OPT_REFCOUNTED_P(p)) Z_ADDREF_P(p); - ZEND_HASH_FILL_ADD(p); + if (Z_TYPE_INFO_P(p) != IS_UNDEF) { + if (Z_OPT_REFCOUNTED_P(p)) { + Z_ADDREF_P(p); + } + ZEND_HASH_FILL_ADD(p); + } p++; i++; } @@ -2243,8 +2247,12 @@ static void debug_backtrace_get_args(zend_execute_data *call, zval *arg_array) / } while (i < num_args) { - if (Z_OPT_REFCOUNTED_P(p)) Z_ADDREF_P(p); - ZEND_HASH_FILL_ADD(p); + if (Z_TYPE_INFO_P(p) != IS_UNDEF) { + if (Z_OPT_REFCOUNTED_P(p)) { + Z_ADDREF_P(p); + } + ZEND_HASH_FILL_ADD(p); + } p++; i++; } |
