]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.0' into PHP-7.1
authorBob Weinand <bobwei9@hotmail.com>
Wed, 5 Oct 2016 10:20:06 +0000 (12:20 +0200)
committerBob Weinand <bobwei9@hotmail.com>
Wed, 5 Oct 2016 10:20:06 +0000 (12:20 +0200)
1  2 
sapi/phpdbg/phpdbg_help.c
sapi/phpdbg/phpdbg_list.c

Simple merge
index a1403dbc30a05bf15ea95c6ef976f9312ecc3235,6895bea43ef371ba48344a0e9913dcdfe043ad99..dd0187cfbe7e77701126fec43d0793ea401a55f0
@@@ -317,17 -316,6 +317,17 @@@ zend_op_array *phpdbg_init_compile_file
        dataptr = zend_hash_str_find_ptr(&PHPDBG_G(file_sources), filename, strlen(filename));
        ZEND_ASSERT(dataptr != NULL);
  
-               /* un-intern these strings to prevent zend_restore_strings from invalidating our string pointers too early */
 +      if (op_array->vars) {
 +              int i;
++              /* un-intern these strings to prevent zend_interned_strings_restore from invalidating our string pointers too early (in phpdbg allocated memory only gets freed after module shutdown) */
 +              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;