longxinH / xhprof

PHP7/PHP8 support
http://pecl.php.net/package/xhprof
Apache License 2.0
1.09k stars 167 forks source link

[2.0] core dumped #9

Closed phpng closed 6 years ago

phpng commented 6 years ago

php: 7.1.10

#0  0x00007f26caf0bdf8 in zm_startup_xhprof (type=<optimized out>, module_number=<optimized out>)
    at /usr/local/src/xhprof-2.0.0/extension/xhprof.c:229
#1  0x00000000007f2787 in zend_startup_module_ex (module=0x1424cd0)
    at /usr/local/src/php-7.1.10/Zend/zend_API.c:1843
#2  0x00000000007f287c in zend_startup_module_zval (zv=<optimized out>)
    at /usr/local/src/php-7.1.10/Zend/zend_API.c:1858
#3  0x00000000007ffdab in zend_hash_apply (ht=ht@entry=0x1144a60 <module_registry>,
    apply_func=apply_func@entry=0x7f2870 <zend_startup_module_zval>)
    at /usr/local/src/php-7.1.10/Zend/zend_hash.c:1507
#4  0x00000000007f2b6a in zend_startup_modules () at /usr/local/src/php-7.1.10/Zend/zend_API.c:1969
#5  0x000000000077df66 in php_module_startup (sf=<optimized out>,
    additional_modules=additional_modules@entry=0x0, num_additional_modules=num_additional_modules@entry=0)
    at /usr/local/src/php-7.1.10/main/main.c:2275
#6  0x000000000089550d in php_cli_startup (sapi_module=<optimized out>)
    at /usr/local/src/php-7.1.10/sapi/cli/php_cli.c:427
#7  0x000000000043be5e in main (argc=2, argv=0x13a1e70) at /usr/local/src/php-7.1.10/sapi/cli/php_cli.c:1348
longxinH commented 6 years ago

@phpng I can't reproduce it here. Can you provide php -v?

ailyfeng commented 6 years ago

我用的是php7.0.正常使用的

phpng commented 6 years ago

@longxinH

PHP 7.1.10 (cli) (built: Oct 11 2017 15:44:45) ( ZTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies

Sys:

CentOS Linux release 7.2.1511 (Core)
phpng commented 6 years ago

另外在make阶段有好多的额警告:

/usr/local/src/xhprof-2.0.0/extension/xhprof.c: 在函数‘hp_get_entry_name’中:
/usr/local/src/xhprof-2.0.0/extension/xhprof.c:518:5: 警告:返回时将指针赋给整数,未作类型转换 [默认启用]
     return result_buf;
     ^
/usr/local/src/xhprof-2.0.0/extension/xhprof.c: 在函数‘hp_get_function_stack’中:
/usr/local/src/xhprof-2.0.0/extension/xhprof.c:569:9: 警告:返回时将整数赋给指针,未作类型转换 [默认启用]
         return hp_get_entry_name(entry);
         ^
/usr/local/src/xhprof-2.0.0/extension/xhprof.c:583:17: 警告:赋值时将整数赋给指针,未作类型转换 [默认启用]
     curr_result = hp_get_entry_name(entry);
                 ^
/usr/local/src/xhprof-2.0.0/extension/xhprof.c: 在函数‘hp_trace_callback_curl_exec’中:
/usr/local/src/xhprof-2.0.0/extension/xhprof.c:1604:13: 警告:从不兼容的指针类型初始化 [默认启用]
             params: &params,
             ^
/usr/local/src/xhprof-2.0.0/extension/xhprof.c:1604:13: 警告:(在‘fci.params’的初始化附近) [默认启用]
/usr/local/src/xhprof-2.0.0/extension/xhprof.c: 在函数‘hp_init_trace_callbacks’中:
/usr/local/src/xhprof-2.0.0/extension/xhprof.c:1654:5: 警告:传递‘_zend_hash_str_update’的第 4 个参数时在不兼容的指针类型间转换 [默认启用]
     register_trace_callback("PDO::exec", callback);
longxinH commented 6 years ago

@phpng 出现段错误是因为ZTS模式的问题,make过程中的警告可以忽略,已经修复了试下v2.0.1版本。谢谢反馈

phpng commented 6 years ago

@longxinH 新版本没问题