Skip to content

Commit

Permalink
fix segmentation fault
Browse files Browse the repository at this point in the history
  • Loading branch information
longxinH committed Oct 11, 2018
1 parent 6d45284 commit c382321
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion extension/php_xhprof.h
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ extern zend_module_entry xhprof_module_entry;
*/

/* XHProf version */
#define XHPROF_VERSION "2.0.2"
#define XHPROF_VERSION "2.0.3"

/* Fictitious function name to represent top of the call tree. The paranthesis
* in the name is to ensure we don't conflict with user function names. */
Expand Down
4 changes: 2 additions & 2 deletions extension/xhprof.c
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ static uint64 cpu_timer()
struct rusage ru;
getrusage(RUSAGE_SELF, &ru);

return (ru.ru_utime.tv_sec + ru.ru_stime.tv_sec ) * 1000 * 1000 + (ru.ru_utime.tv_usec + ru.ru_stime.tv_usec);
return (ru.ru_utime.tv_sec + ru.ru_stime.tv_sec ) * 1000 * 1000 + (ru.ru_utime.tv_usec + ru.ru_stime.tv_usec);
#endif
}

Expand Down Expand Up @@ -1605,7 +1605,7 @@ char *hp_get_trace_callback(char* symbol, zend_execute_data *data)
char *result;
hp_trace_callback *callback;

callback = (hp_trace_callback*)zend_hash_str_find(XHPROF_G(trace_callbacks), symbol, strlen(symbol));
callback = (hp_trace_callback*)zend_hash_str_find_ptr(XHPROF_G(trace_callbacks), symbol, strlen(symbol));
if (callback) {
result = (*callback)(symbol, data);
} else {
Expand Down

0 comments on commit c382321

Please sign in to comment.