Skip to content

Commit c382321

Browse files
committed
fix segmentation fault
#16
1 parent 6d45284 commit c382321

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

extension/php_xhprof.h

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ extern zend_module_entry xhprof_module_entry;
3939
*/
4040

4141
/* XHProf version */
42-
#define XHPROF_VERSION "2.0.2"
42+
#define XHPROF_VERSION "2.0.3"
4343

4444
/* Fictitious function name to represent top of the call tree. The paranthesis
4545
* in the name is to ensure we don't conflict with user function names. */

extension/xhprof.c

100644100755
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ static uint64 cpu_timer()
853853
struct rusage ru;
854854
getrusage(RUSAGE_SELF, &ru);
855855

856-
return (ru.ru_utime.tv_sec + ru.ru_stime.tv_sec ) * 1000 * 1000 + (ru.ru_utime.tv_usec + ru.ru_stime.tv_usec);
856+
return (ru.ru_utime.tv_sec + ru.ru_stime.tv_sec ) * 1000 * 1000 + (ru.ru_utime.tv_usec + ru.ru_stime.tv_usec);
857857
#endif
858858
}
859859

@@ -1605,7 +1605,7 @@ char *hp_get_trace_callback(char* symbol, zend_execute_data *data)
16051605
char *result;
16061606
hp_trace_callback *callback;
16071607

1608-
callback = (hp_trace_callback*)zend_hash_str_find(XHPROF_G(trace_callbacks), symbol, strlen(symbol));
1608+
callback = (hp_trace_callback*)zend_hash_str_find_ptr(XHPROF_G(trace_callbacks), symbol, strlen(symbol));
16091609
if (callback) {
16101610
result = (*callback)(symbol, data);
16111611
} else {

0 commit comments

Comments
 (0)