]> granicus.if.org Git - php/commitdiff
Added exceptions for ZEND_RC_DEBUG
authorDmitry Stogov <dmitry@zend.com>
Thu, 2 Nov 2017 11:13:28 +0000 (14:13 +0300)
committerDmitry Stogov <dmitry@zend.com>
Thu, 2 Nov 2017 11:13:28 +0000 (14:13 +0300)
sapi/phpdbg/phpdbg.c
sapi/phpdbg/phpdbg_watch.c

index b212679ab941085982f9dd3e36a419f99ac38590..2eefb18d9425603d8b7ca3d4fea8e007175db5b9 100644 (file)
@@ -2096,6 +2096,7 @@ phpdbg_out:
                if (PHPDBG_G(exec) && strcmp("Standard input code", PHPDBG_G(exec)) == SUCCESS) { /* i.e. execution context has been read from stdin - back it up */
                        phpdbg_file_source *data = zend_hash_str_find_ptr(&PHPDBG_G(file_sources), PHPDBG_G(exec), PHPDBG_G(exec_len));
                        backup_phpdbg_compile = zend_string_alloc(data->len + 2, 1);
+                       GC_MAKE_PERSISTENT_LOCAL(backup_phpdbg_compile);
                        sprintf(ZSTR_VAL(backup_phpdbg_compile), "?>%.*s", (int) data->len, data->buf);
                }
 
index 6267f4fadf6bb58af28104ea9a1704318424e449..feeb77a4450fdda96756f9a9cbc7576dd7b397ad 100644 (file)
@@ -326,6 +326,7 @@ void phpdbg_watch_backup_data(phpdbg_watchpoint_t *watch) {
                                zend_string_release(watch->backup.str);
                        }
                        watch->backup.str = zend_string_init((char *) watch->addr.ptr + XtOffsetOf(zend_string, val) - XtOffsetOf(zend_string, len), *(size_t *) watch->addr.ptr, 1);
+                       GC_MAKE_PERSISTENT_LOCAL(watch->backup.str);
                        break;
                case WATCH_ON_HASHTABLE:
                        memcpy((char *) &watch->backup + HT_WATCH_OFFSET, watch->addr.ptr, watch->size);