Closed xijiadmin closed 5 years ago
没有足够的信息,如果你有类似的情况,并且php coredump,请上传一下core文件的函数调用栈. thx
php版本:PHP 7.0.18 (cli) (built: Oct 24 2017 17:46:37) ( NTS ),安装了xdebug等插件 测试代码 :
<?php
$opencc = opencc_open('config' . DIRECTORY_SEPARATOR . 's2t.json');
opencc_convert(urldecode('%E8'), $opencc);
(gdb) bt
#0 0x00007f2dce7b594f in __strlen_sse42 () from /lib64/libc.so.6
#1 0x00007f2dc449dfaa in zif_opencc_convert (execute_data=<value optimized out>, return_value=0x7f2dcb2130d0)
at /srv/source/php-ext-opencc4php/opencc.c:174
#2 0x00007f2dc513e045 in xdebug_execute_internal (current_execute_data=0x7f2dcb213230, return_value=0x7f2dcb2130d0)
at /srv/source/xdebug-2.5.5/xdebug.c:2206
#3 0x0000000000853092 in ZEND_DO_FCALL_SPEC_HANDLER (execute_data=0x7f2dcb213030) at /srv/source/php-7.0.18/Zend/zend_vm_execute.h:844
#4 0x000000000082b960 in execute_ex (ex=<value optimized out>) at /srv/source/php-7.0.18/Zend/zend_vm_execute.h:417
#5 0x00007f2dc513e62f in xdebug_execute_ex (execute_data=0x7f2dcb213030) at /srv/source/xdebug-2.5.5/xdebug.c:2056
#6 0x000000000087f42b in zend_execute (op_array=0x7f2dcb27e000, return_value=<value optimized out>)
at /srv/source/php-7.0.18/Zend/zend_vm_execute.h:458
#7 0x00000000007ebc43 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /srv/source/php-7.0.18/Zend/zend.c:1443
#8 0x000000000078dbd0 in php_execute_script (primary_file=0x7fff466aa470) at /srv/source/php-7.0.18/main/main.c:2492
#9 0x00000000008837aa in do_cli (argc=2, argv=0x1db0a30) at /srv/source/php-7.0.18/sapi/cli/php_cli.c:977
#10 0x0000000000883faa in main (argc=2, argv=0x1db0a30) at /srv/source/php-7.0.18/sapi/cli/php_cli.c:1347
注意:只有简体转换为繁体时,会出现这个问题
我build了php7.0.18, 并且使用了xdebug2.5.5 在centos6.3上未遇到相同的问题
[...@... tmp]$ php -v PHP 7.0.18 (cli) (built: Feb 9 2018 10:38:13) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies with Xdebug v2.5.5, Copyright (c) 2002-2017, by Derick Rethans [...@... tmp]$ cat 1.php \<\?php $opencc = opencc_open('s2t.json'); $a = opencc_convert(urldecode('%E8'), $opencc); var_dump(bin2hex($a)); [...@... tmp]$ php 1.php /tmp/1.php:4: string(2) "e8"
如果可以的话,麻烦将core文件发送给我邮箱一下pkujhd@gmail.com
已发送邮件,请查收
仍没有复现问题, 另外我看下一下奔溃栈
# 1 0x00007f2dc449dfaa in zif_opencc_convert (execute_data=
是否你的什么配置存在问题
见 https://github.com/NauxLiu/opencc4php/issues/24 ,为什么关了?是不是问题不予解决?需要其他的日志信息?或者别的?