diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2015-07-23 01:03:03 +0200 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2015-07-23 01:03:03 +0200 |
commit | 686b9039a6d8ba820538222bbb44925ae25c4c93 (patch) | |
tree | 049c25627a8d27fbdb72b67ab7131a803e21ac12 /sapi/phpdbg/phpdbg_list.c | |
parent | 531fa70ba843895270a795acebaebca143704abb (diff) | |
download | php-git-686b9039a6d8ba820538222bbb44925ae25c4c93.tar.gz |
Fix phpdbg test failure and crash with opcache
Diffstat (limited to 'sapi/phpdbg/phpdbg_list.c')
-rw-r--r-- | sapi/phpdbg/phpdbg_list.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sapi/phpdbg/phpdbg_list.c b/sapi/phpdbg/phpdbg_list.c index a2f5ff6cc5..3a7761cc64 100644 --- a/sapi/phpdbg/phpdbg_list.c +++ b/sapi/phpdbg/phpdbg_list.c @@ -289,7 +289,12 @@ zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type) { zend_file_handle_dtor(&fake); dataptr->op_array = ret; - ++*dataptr->op_array->refcount; + if (dataptr->op_array->refcount) { + ++*dataptr->op_array->refcount; + } else { + dataptr->op_array->refcount = emalloc(sizeof(uint32_t)); + *dataptr->op_array->refcount = 2; + } return ret; } |