File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1168,8 +1168,8 @@ int phpdbg_print_changed_zvals(void) {
1168
1168
1169
1169
if (zend_hash_num_elements (PHPDBG_G (watchlist_mem )) > 0 ) {
1170
1170
/* we must not add elements to the hashtable while iterating over it (resize => read into freed memory) */
1171
- mem_list = PHPDBG_G (watchlist_mem );
1172
- PHPDBG_G (watchlist_mem ) = PHPDBG_G ( watchlist_mem_backup );
1171
+ mem_list = zend_new_array ( zend_hash_num_elements ( PHPDBG_G (watchlist_mem )) );
1172
+ zend_hash_copy ( mem_list , PHPDBG_G (watchlist_mem ), ( copy_ctor_func_t ) zval_add_ref );
1173
1173
1174
1174
ZEND_HASH_MAP_FOREACH_NUM_KEY (mem_list , page ) {
1175
1175
phpdbg_btree_position pos = phpdbg_btree_find_between (& PHPDBG_G (watchpoint_tree ), page , page + phpdbg_pagesize );
@@ -1192,7 +1192,7 @@ int phpdbg_print_changed_zvals(void) {
1192
1192
phpdbg_reenable_memory_watches ();
1193
1193
1194
1194
if (mem_list ) {
1195
- PHPDBG_G ( watchlist_mem ) = mem_list ;
1195
+ zend_hash_destroy ( mem_list ) ;
1196
1196
phpdbg_reenable_memory_watches ();
1197
1197
}
1198
1198
You can’t perform that action at this time.
0 commit comments