Permalink
Browse files

Merged pull request #401

  • Loading branch information...
derickr committed Jan 8, 2018
2 parents 26223fe + 78312ca commit 9655deb8da6dd59c3b2a9332b02df73ea76a07a3
@@ -1,6 +1,5 @@
#!/bin/bash
export CFLAGS="-Wall -Werror -Wextra -Wdeclaration-after-statement -Wmissing-field-initializers -Wshadow -Wno-unused-parameter -ggdb3"
phpize
./configure
./configure --enable-xdebug-dev
make all
View
@@ -3,6 +3,10 @@ dnl config.m4 for extension Xdebug
PHP_ARG_ENABLE(xdebug, whether to enable Xdebug support,
[ --enable-xdebug Enable Xdebug support])
PHP_ARG_ENABLE(xdebug-dev, whether to enable Xdebug developer build flags,
[ --enable-xdebug-dev Xdebug: Enable developer flags],, no)
if test "$PHP_XDEBUG" != "no"; then
AC_MSG_CHECKING([Check for supported PHP versions])
PHP_XDEBUG_FOUND_VERSION=`${PHP_CONFIG} --version`
@@ -29,7 +33,51 @@ if test "$PHP_XDEBUG" != "no"; then
CPPFLAGS=$old_CPPFLAGS
PHP_NEW_EXTENSION(xdebug, xdebug.c xdebug_branch_info.c xdebug_code_coverage.c xdebug_com.c xdebug_compat.c xdebug_gc_stats.c xdebug_filter.c xdebug_handler_dbgp.c xdebug_handlers.c xdebug_llist.c xdebug_monitor.c xdebug_hash.c xdebug_private.c xdebug_profiler.c xdebug_set.c xdebug_stack.c xdebug_str.c xdebug_superglobals.c xdebug_tracing.c xdebug_trace_textual.c xdebug_trace_computerized.c xdebug_trace_html.c xdebug_var.c xdebug_xml.c usefulstuff.c, $ext_shared,,,,yes)
if test "$PHP_XDEBUG_DEV" = "yes"; then
PHP_CHECK_GCC_ARG(-Wbool-conversion, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wbool-conversion")
PHP_CHECK_GCC_ARG(-Wdeclaration-after-statement, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wdeclaration-after-statement")
PHP_CHECK_GCC_ARG(-Wdiscarded-qualifiers, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wdiscarded-qualifiers")
PHP_CHECK_GCC_ARG(-Wduplicate-enum, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wduplicate-enum")
PHP_CHECK_GCC_ARG(-Wempty-body, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wempty-body")
PHP_CHECK_GCC_ARG(-Wenum-compare, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wenum-compare")
PHP_CHECK_GCC_ARG(-Werror, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Werror")
PHP_CHECK_GCC_ARG(-Wextra, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wextra")
PHP_CHECK_GCC_ARG(-Wformat-nonliteral, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wformat-nonliteral")
PHP_CHECK_GCC_ARG(-Wformat-security, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wformat-security")
PHP_CHECK_GCC_ARG(-Wheader-guard, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wheader-guard")
PHP_CHECK_GCC_ARG(-Wincompatible-pointer-types-discards-qualifiers, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wincompatible-pointer-types-discards-qualifiers")
PHP_CHECK_GCC_ARG(-Wimplicit-fallthrough, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wimplicit-fallthrough")
PHP_CHECK_GCC_ARG(-Winit-self, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Winit-self")
PHP_CHECK_GCC_ARG(-Wlogical-not-parentheses, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wlogical-not-parentheses")
PHP_CHECK_GCC_ARG(-Wlogical-op, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wlogical-op")
PHP_CHECK_GCC_ARG(-Wlogical-op-parentheses, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wlogical-op-parentheses")
PHP_CHECK_GCC_ARG(-Wloop-analysis, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wloop-analysis")
PHP_CHECK_GCC_ARG(-Wmaybe-uninitialized, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wmaybe-uninitialized")
PHP_CHECK_GCC_ARG(-Wmissing-format-attribute, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wmissing-format-attribute")
PHP_CHECK_GCC_ARG(-Wno-missing-field-initializers, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wno-missing-field-initializers")
PHP_CHECK_GCC_ARG(-Wno-sign-compare, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wno-sign-compare")
PHP_CHECK_GCC_ARG(-Wno-unused-but-set-variable, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wno-unused-but-set-variable")
PHP_CHECK_GCC_ARG(-Wno-unused-parameter, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wno-unused-parameter")
PHP_CHECK_GCC_ARG(-Wno-variadic-macros, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wno-variadic-macros")
PHP_CHECK_GCC_ARG(-Wparentheses, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wparentheses")
PHP_CHECK_GCC_ARG(-Wpointer-bool-conversion, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wpointer-bool-conversion")
PHP_CHECK_GCC_ARG(-Wsizeof-array-argument, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wsizeof-array-argument")
PHP_CHECK_GCC_ARG(-Wstring-conversion, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wstring-conversion")
PHP_CHECK_GCC_ARG(-Wwrite-strings, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wwrite-strings")
PHP_CHECK_GCC_ARG(-fdiagnostics-show-option, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -fdiagnostics-show-option")
PHP_CHECK_GCC_ARG(-fno-exceptions, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -fno-exceptions")
PHP_CHECK_GCC_ARG(-fno-omit-frame-pointer, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -fno-omit-frame-pointer")
PHP_CHECK_GCC_ARG(-fno-optimize-sibling-calls, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -fno-optimize-sibling-calls")
PHP_CHECK_GCC_ARG(-fsanitize-address, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -fsanitize-address")
PHP_CHECK_GCC_ARG(-fstack-protector, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -fstack-protector")
MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS"
STD_CFLAGS="-g -O0 -Wall"
fi
PHP_XDEBUG_CFLAGS="$STD_CFLAGS $MAINTAINER_CFLAGS"
PHP_NEW_EXTENSION(xdebug, xdebug.c xdebug_branch_info.c xdebug_code_coverage.c xdebug_com.c xdebug_compat.c xdebug_gc_stats.c xdebug_filter.c xdebug_handler_dbgp.c xdebug_handlers.c xdebug_llist.c xdebug_monitor.c xdebug_hash.c xdebug_private.c xdebug_profiler.c xdebug_set.c xdebug_stack.c xdebug_str.c xdebug_superglobals.c xdebug_tracing.c xdebug_trace_textual.c xdebug_trace_computerized.c xdebug_trace_html.c xdebug_var.c xdebug_xml.c usefulstuff.c, $ext_shared,,$PHP_XDEBUG_CFLAGS,,yes)
PHP_SUBST(XDEBUG_SHARED_LIBADD)
PHP_ADD_MAKEFILE_FRAGMENT
fi
View
@@ -283,7 +283,7 @@ ZEND_BEGIN_MODULE_GLOBALS(xdebug)
int profile_last_functionname_ref;
/* DBGp globals */
char *lastcmd;
const char *lastcmd;
char *lasttransid;
/* output redirection */
View
@@ -1,4 +1,3 @@
#!/bin/sh
export CFLAGS="-Wall -Werror -Wextra -Wmaybe-uninitialized -Wdeclaration-after-statement -Wmissing-field-initializers -Wshadow -Wno-unused-parameter -ggdb3"
phpize && ./configure && make clean && make -j 5 all && make install
phpize && ./configure --enable-xdebug-dev && make clean && make -j 5 all && make install
View
@@ -106,7 +106,7 @@ char* xdebug_fd_read_line_delim(int socketfd, fd_buf *context, int type, unsigne
return tmp;
}
char *xdebug_join(char *delim, xdebug_arg *args, int begin, int end)
char *xdebug_join(const char *delim, xdebug_arg *args, int begin, int end)
{
int i;
xdebug_str *ret;
@@ -126,7 +126,7 @@ char *xdebug_join(char *delim, xdebug_arg *args, int begin, int end)
return ret->d;
}
void xdebug_explode(char *delim, char *str, xdebug_arg *args, int limit)
void xdebug_explode(const char *delim, char *str, xdebug_arg *args, int limit)
{
char *p1, *p2, *endp;
@@ -161,7 +161,7 @@ void xdebug_explode(char *delim, char *str, xdebug_arg *args, int limit)
}
}
char* xdebug_memnstr(char *haystack, char *needle, int needle_len, char *end)
char* xdebug_memnstr(char *haystack, const char *needle, int needle_len, char *end)
{
char *p = haystack;
char first = *needle;
@@ -406,7 +406,7 @@ long xdebug_crc32(const char *string, int str_len)
}
#ifndef PHP_WIN32
static FILE *xdebug_open_file(char *fname, char *mode, char *extension, char **new_fname)
static FILE *xdebug_open_file(char *fname, const char *mode, const char *extension, char **new_fname)
{
FILE *fh;
char *tmp_fname;
@@ -425,7 +425,7 @@ static FILE *xdebug_open_file(char *fname, char *mode, char *extension, char **n
return fh;
}
static FILE *xdebug_open_file_with_random_ext(char *fname, char *mode, char *extension, char **new_fname)
static FILE *xdebug_open_file_with_random_ext(char *fname, const char *mode, const char *extension, char **new_fname)
{
FILE *fh;
char *tmp_fname;
@@ -445,7 +445,7 @@ static FILE *xdebug_open_file_with_random_ext(char *fname, char *mode, char *ext
return fh;
}
FILE *xdebug_fopen(char *fname, char *mode, char *extension, char **new_fname)
FILE *xdebug_fopen(char *fname, const char *mode, const char *extension, char **new_fname)
{
int r;
FILE *fh;
@@ -644,7 +644,7 @@ int xdebug_format_output_filename(char **filename, char *format, char *script_na
char *char_ptr, *strval;
char *sess_name;
sess_name = zend_ini_string("session.name", sizeof("session.name"), 0);
sess_name = zend_ini_string((char*) "session.name", sizeof("session.name"), 0);
if (sess_name && Z_TYPE(PG(http_globals)[TRACK_VARS_COOKIE]) == IS_ARRAY &&
((data = zend_hash_str_find(Z_ARRVAL(PG(http_globals)[TRACK_VARS_COOKIE]), sess_name, strlen(sess_name))) != NULL) &&
View
@@ -52,15 +52,15 @@ typedef struct xdebug_arg {
#define xdebug_fd_read_line(s,c,t) xdebug_fd_read_line_delim(s, c, t, '\n', NULL)
char* xdebug_fd_read_line_delim(int socket, fd_buf *context, int type, unsigned char delim, int *length);
char *xdebug_join(char *delim, xdebug_arg *args, int begin, int end);
void xdebug_explode(char *delim, char *str, xdebug_arg *args, int limit);
char* xdebug_memnstr(char *haystack, char *needle, int needle_len, char *end);
char *xdebug_join(const char *delim, xdebug_arg *args, int begin, int end);
void xdebug_explode(const char *delim, char *str, xdebug_arg *args, int limit);
char* xdebug_memnstr(char *haystack, const char *needle, int needle_len, char *end);
char* xdebug_strrstr(const char* haystack, const char* needle);
double xdebug_get_utime(void);
char* xdebug_get_time(void);
char *xdebug_path_to_url(const char *fileurl TSRMLS_DC);
char *xdebug_path_from_url(const char *fileurl TSRMLS_DC);
FILE *xdebug_fopen(char *fname, char *mode, char *extension, char **new_fname);
FILE *xdebug_fopen(char *fname, const char *mode, const char *extension, char **new_fname);
int xdebug_format_output_filename(char **filename, char *format, char *script_name);
int xdebug_format_file_link(char **filename, const char *error_filename, int error_lineno TSRMLS_DC);
int xdebug_format_filename(char **formatted_name, const char *format, const char *default_format, const char *filename TSRMLS_DC);
View
@@ -93,7 +93,7 @@ int zend_xdebug_filter_offset = -1;
static int (*xdebug_orig_header_handler)(sapi_header_struct *h, sapi_header_op_enum op, sapi_headers_struct *s TSRMLS_DC);
static size_t (*xdebug_orig_ub_write)(const char *string, size_t len TSRMLS_DC);
static int xdebug_trigger_enabled(int setting, char *var_name, char *var_value TSRMLS_DC);
static int xdebug_trigger_enabled(int setting, const char *var_name, char *var_value TSRMLS_DC);
ZEND_BEGIN_ARG_INFO_EX(xdebug_void_args, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 0)
ZEND_END_ARG_INFO()
@@ -415,9 +415,9 @@ static void php_xdebug_init_globals (zend_xdebug_globals *xg TSRMLS_DC)
xg->trace_context = NULL;
xg->in_debug_info = 0;
xg->coverage_enable = 0;
xg->previous_filename = "";
xg->previous_filename = NULL;
xg->previous_file = NULL;
xg->previous_mark_filename = "";
xg->previous_mark_filename = NULL;
xg->previous_mark_file = NULL;
xg->paths_stack = NULL;
xg->branches.size = 0;
@@ -538,7 +538,7 @@ void xdebug_env_config(TSRMLS_D)
xdebug_explode(" ", config, parts, -1);
for (i = 0; i < parts->c; ++i) {
char *name = NULL;
const char *name = NULL;
char *envvar = parts->args[i];
char *envval = NULL;
char *eq = strchr(envvar, '=');
@@ -1117,14 +1117,14 @@ size_t xdebug_ub_write(const char *string, size_t length TSRMLS_DC)
static void xdebug_init_auto_globals(TSRMLS_D)
{
zend_is_auto_global_str(ZEND_STRL("_ENV") TSRMLS_CC);
zend_is_auto_global_str(ZEND_STRL("_GET") TSRMLS_CC);
zend_is_auto_global_str(ZEND_STRL("_POST") TSRMLS_CC);
zend_is_auto_global_str(ZEND_STRL("_COOKIE") TSRMLS_CC);
zend_is_auto_global_str(ZEND_STRL("_REQUEST") TSRMLS_CC);
zend_is_auto_global_str(ZEND_STRL("_FILES") TSRMLS_CC);
zend_is_auto_global_str(ZEND_STRL("_SERVER") TSRMLS_CC);
zend_is_auto_global_str(ZEND_STRL("_SESSION") TSRMLS_CC);
zend_is_auto_global_str((char*) ZEND_STRL("_ENV") TSRMLS_CC);
zend_is_auto_global_str((char*) ZEND_STRL("_GET") TSRMLS_CC);
zend_is_auto_global_str((char*) ZEND_STRL("_POST") TSRMLS_CC);
zend_is_auto_global_str((char*) ZEND_STRL("_COOKIE") TSRMLS_CC);
zend_is_auto_global_str((char*) ZEND_STRL("_REQUEST") TSRMLS_CC);
zend_is_auto_global_str((char*) ZEND_STRL("_FILES") TSRMLS_CC);
zend_is_auto_global_str((char*) ZEND_STRL("_SERVER") TSRMLS_CC);
zend_is_auto_global_str((char*) ZEND_STRL("_SESSION") TSRMLS_CC);
}
@@ -1223,7 +1223,7 @@ PHP_RINIT_FUNCTION(xdebug)
XG(dead_code_analysis_tracker_offset) = zend_xdebug_cc_run_offset;
XG(dead_code_last_start_id) = 1;
XG(code_coverage_filter_offset) = zend_xdebug_filter_offset;
XG(previous_filename) = "";
XG(previous_filename) = NULL;
XG(previous_file) = NULL;
XG(gc_stats_file) = NULL;
XG(gc_stats_filename) = NULL;
@@ -1245,7 +1245,7 @@ PHP_RINIT_FUNCTION(xdebug)
)
&& !SG(headers_sent)
) {
xdebug_setcookie("XDEBUG_SESSION", sizeof("XDEBUG_SESSION"), "", 0, time(NULL) + XG(remote_cookie_expire_time), "/", 1, NULL, 0, 0, 1, 0 TSRMLS_CC);
xdebug_setcookie("XDEBUG_SESSION", sizeof("XDEBUG_SESSION"), (char*) "", 0, time(NULL) + XG(remote_cookie_expire_time), "/", 1, NULL, 0, 0, 1, 0 TSRMLS_CC);
XG(no_exec) = 1;
}
zend_string_release(stop_no_exec);
@@ -1416,7 +1416,7 @@ ZEND_MODULE_POST_ZEND_DEACTIVATE_D(xdebug)
XG(branches).last_branch_nr = NULL;
XG(branches).size = 0;
}
XG(previous_mark_filename) = "";
XG(previous_mark_filename) = NULL;
return SUCCESS;
}
@@ -1447,17 +1447,17 @@ PHP_MINFO_FUNCTION(xdebug)
}
php_info_print_table_start();
php_info_print_table_header(2, "Supported protocols", "Revision");
php_info_print_table_header(1, "Supported protocols");
while (ptr->name) {
php_info_print_table_row(2, ptr->description, ptr->handler.get_revision());
php_info_print_table_row(1, ptr->description);
ptr++;
}
php_info_print_table_end();
DISPLAY_INI_ENTRIES();
}
static int xdebug_trigger_enabled(int setting, char *var_name, char *var_value TSRMLS_DC)
static int xdebug_trigger_enabled(int setting, const char *var_name, char *var_value TSRMLS_DC)
{
zval *trigger_val;
@@ -1773,7 +1773,7 @@ void xdebug_execute_ex(zend_execute_data *execute_data TSRMLS_DC)
xdfree(magic_cookie);
magic_cookie = NULL;
}
xdebug_setcookie("XDEBUG_SESSION", sizeof("XDEBUG_SESSION"), "", 0, time(NULL) + XG(remote_cookie_expire_time), "/", 1, NULL, 0, 0, 1, 0 TSRMLS_CC);
xdebug_setcookie("XDEBUG_SESSION", sizeof("XDEBUG_SESSION"), (char*) "", 0, time(NULL) + XG(remote_cookie_expire_time), "/", 1, NULL, 0, 0, 1, 0 TSRMLS_CC);
}
/* Start remote context if requested */
@@ -2588,7 +2588,7 @@ ZEND_DLEXPORT void xdebug_statement_call(zend_op_array *op_array)
XG(context).inhibit_notifications = 1;
/* Check the condition */
if (zend_eval_string(extra_brk_info->condition, &retval, "xdebug conditional breakpoint" TSRMLS_CC) == SUCCESS) {
if (zend_eval_string(extra_brk_info->condition, &retval, (char*) "xdebug conditional breakpoint" TSRMLS_CC) == SUCCESS) {
break_ok = Z_TYPE(retval) == IS_TRUE;
zval_dtor(&retval);
}
@@ -2662,14 +2662,15 @@ ZEND_DLEXPORT void xdebug_init_oparray(zend_op_array *op_array)
#ifndef ZEND_EXT_API
#define ZEND_EXT_API ZEND_DLEXPORT
#endif
ZEND_EXTENSION();
ZEND_EXT_API zend_extension_version_info extension_version_info = { ZEND_EXTENSION_API_NO, (char*) ZEND_EXTENSION_BUILD_ID };
ZEND_DLEXPORT zend_extension zend_extension_entry = {
XDEBUG_NAME,
XDEBUG_VERSION,
XDEBUG_AUTHOR,
XDEBUG_URL_FAQ,
XDEBUG_COPYRIGHT_SHORT,
(char*) XDEBUG_NAME,
(char*) XDEBUG_VERSION,
(char*) XDEBUG_AUTHOR,
(char*) XDEBUG_URL_FAQ,
(char*) XDEBUG_COPYRIGHT_SHORT,
xdebug_zend_startup,
xdebug_zend_shutdown,
NULL, /* activate_func_t */
View
@@ -339,7 +339,7 @@ void xdebug_branch_info_mark_reached(char *file_name, char *function_name, zend_
xdebug_coverage_function *function;
xdebug_branch_info *branch_info;
if (strcmp(XG(previous_mark_filename), file_name) == 0) {
if (XG(previous_mark_filename) && strcmp(XG(previous_mark_filename), file_name) == 0) {
file = XG(previous_mark_file);
} else {
if (!xdebug_hash_find(XG(code_coverage), file_name, strlen(file_name), (void *) &file)) {
@@ -401,7 +401,7 @@ void xdebug_branch_info_mark_end_of_function_reached(char *filename, char *funct
xdebug_branch_info *branch_info;
xdebug_path *path;
if (strcmp(XG(previous_mark_filename), filename) == 0) {
if (XG(previous_mark_filename) && strcmp(XG(previous_mark_filename), filename) == 0) {
file = XG(previous_mark_file);
} else {
if (!xdebug_hash_find(XG(code_coverage), filename, strlen(filename), (void *) &file)) {
@@ -434,7 +434,7 @@ void xdebug_branch_info_add_branches_and_paths(char *filename, char *function_na
xdebug_coverage_file *file;
xdebug_coverage_function *function;
if (strcmp(XG(previous_filename), filename) == 0) {
if (XG(previous_filename) && strcmp(XG(previous_filename), filename) == 0) {
file = XG(previous_file);
} else {
/* Check if the file already exists in the hash */
View
@@ -194,7 +194,7 @@ static char *xdebug_find_var_name(zend_execute_data *execute_data, const zend_op
int gohungfound = 0, is_static = 0;
char *zval_value = NULL;
xdebug_var_export_options *options;
const zend_op *static_opcode_ptr;
const zend_op *static_opcode_ptr = NULL;
next_opcode = cur_opcode + 1;
prev_opcode = cur_opcode - 1;
@@ -342,7 +342,7 @@ static char *xdebug_find_var_name(zend_execute_data *execute_data, const zend_op
return name.d;
}
static int xdebug_common_assign_dim_handler(char *op, int do_cc, zend_execute_data *execute_data)
static int xdebug_common_assign_dim_handler(const char *op, int do_cc, zend_execute_data *execute_data)
{
char *file;
zend_op_array *op_array = &execute_data->func->op_array;
@@ -471,7 +471,7 @@ void xdebug_count_line(char *filename, int lineno, int executable, int deadcode
xdebug_coverage_file *file;
xdebug_coverage_line *line;
if (strcmp(XG(previous_filename), filename) == 0) {
if (XG(previous_filename) && strcmp(XG(previous_filename), filename) == 0) {
file = XG(previous_file);
} else {
/* Check if the file already exists in the hash */
@@ -974,9 +974,9 @@ PHP_FUNCTION(xdebug_stop_code_coverage)
}
if (XG(do_code_coverage)) {
if (cleanup) {
XG(previous_filename) = "";
XG(previous_filename) = NULL;
XG(previous_file) = NULL;
XG(previous_mark_filename) = "";
XG(previous_mark_filename) = NULL;
XG(previous_mark_file) = NULL;
xdebug_hash_destroy(XG(code_coverage));
XG(code_coverage) = xdebug_hash_alloc(32, xdebug_coverage_file_dtor);
Oops, something went wrong.

0 comments on commit 9655deb

Please sign in to comment.