diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2016-10-01 10:47:31 +0100 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2016-10-01 10:47:31 +0100 |
commit | a5129bcb5becbe5388a2c629d8456f0fbffb1eaa (patch) | |
tree | dd00644a35dc7dc7f275975c12a62b5934cabf55 | |
parent | f6da70863f62cf97dfc2e1dc057f3ec1ea442e54 (diff) | |
parent | 3280a29ee5194a6e627f8eb87492b64ff1959a0e (diff) | |
download | php-git-a5129bcb5becbe5388a2c629d8456f0fbffb1eaa.tar.gz |
Merge branch 'PHP-7.0' into PHP-7.1
-rw-r--r-- | sapi/phpdbg/phpdbg_list.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sapi/phpdbg/phpdbg_list.c b/sapi/phpdbg/phpdbg_list.c index 86a2132b74..a1403dbc30 100644 --- a/sapi/phpdbg/phpdbg_list.c +++ b/sapi/phpdbg/phpdbg_list.c @@ -317,6 +317,17 @@ zend_op_array *phpdbg_init_compile_file(zend_file_handle *file, int type) { dataptr = zend_hash_str_find_ptr(&PHPDBG_G(file_sources), filename, strlen(filename)); ZEND_ASSERT(dataptr != NULL); + if (op_array->vars) { + int i; + /* un-intern these strings to prevent zend_restore_strings from invalidating our string pointers too early */ + for (i = 0; i < op_array->last_var; i++) { + zend_string **s = op_array->vars + i; + if (ZSTR_IS_INTERNED(*s)) { + *s = zend_string_init(ZSTR_VAL(*s), ZSTR_LEN(*s), 0); + } + } + } + dataptr->op_array = *op_array; if (dataptr->op_array.refcount) { ++*dataptr->op_array.refcount; |