Bug #77692 [NEW]: Found crash when mb_convert_encoding() after creating Zookeeper instance
| From: | timandes@php.net | Date: | Tue, 05 Mar 2019 01:05:53 +0000 |
| Subject: | Bug #77692 [NEW]: Found crash when mb_convert_encoding() after creating Zookeeper instance | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-219843@lists.php.net to get a copy of this message | ||
From: timandes
Operating system: CentOS Linux release 7.6.1810 (C
PHP version: master-Git-2019-03-05 (Git)
Package: *Unicode Issues
Bug Type: Bug
Bug description:Found crash when mb_convert_encoding() after creating Zookeeper instance
Description:
------------
I've been reported a strange issue:
https://github.com/php-zookeeper/php-zookeeper/issues/32
and I reproduced it in my container step by step and felt that it's not
related with Zookeeper extension. But I still cannot explain why the
segmentation fault disappeared after I commented out the statement:
$zk = new \Zookeeper('127.0.0.1:2181');
----
Core dump here:
(gdb) bt
#0 0x00000000008c1bf3 in zend_mm_alloc_small (heap=0x7f9369400040,
size=144, bin_num=12, __zend_filename=0x7f9368d97678
"/root/php-src/ext/mbstring/mbstring.c", __zend_lineno=634,
__zend_orig_filename=0x0, __zend_orig_lineno=0) at
/root/php-7.3.1/Zend/zend_alloc.c:1287
#1 0x00000000008c1e8f in zend_mm_alloc_heap (heap=0x7f9369400040,
size=144, __zend_filename=0x7f9368d97678
"/root/php-src/ext/mbstring/mbstring.c", __zend_lineno=634,
__zend_orig_filename=0x0, __zend_orig_lineno=0) at
/root/php-7.3.1/Zend/zend_alloc.c:1358
�
#2 0x00000000008c4ab0 in _emalloc (size=112,
__zend_filename=0x7f9368d97678 "/root/php-src/ext/mbstring/mbstring.c",
__zend_lineno=634, __zend_orig_filename=0x0, __zend_orig_lineno=0)
at /root/php-7.3.1/Zend/zend_alloc.c:2498
#3 0x00007f9368c832dd in _php_mb_allocators_malloc (sz=112) at
/root/php-src/ext/mbstring/mbstring.c:634
#4 0x00007f9368c80bb0 in mbfl_convert_filter_new (from=0x7f9368fbe540
<mbfl_encoding_ascii>, to=0x7f9368fbc920 <mbfl_encoding_wchar>,
output_function=0x7f9368c79655 <mbfl_filt_conv_wchar_utf8>,
flush_function=0x7f9368c814e1 <mbfl_filt_conv_common_flush>,
data=0x7f936958df00)
at /root/php-src/ext/mbstring/libmbfl/mbfl/mbfl_convert.c:177
#5 0x00007f9368c7a9a4 in mbfl_buffer_converter_new (from=0x7f9368fbe540
<mbfl_encoding_ascii>, to=0x7f9368fc2420 <mbfl_encoding_utf8>,
buf_initsz=94)
at /root/php-src/ext/mbstring/libmbfl/mbfl/mbfilter.c:145
#6 0x00007f9368c891e1 in php_mb_convert_encoding_ex
(input=0x7f936958df18 "U\226\307h\223\177", length=94,
to_encoding=0x7f9368fc2420 <mbfl_encoding_utf8>,
from_encoding=0x7f9368fbe540 <mbfl_encoding_ascii>,
output_len=0x7ffe7269b908) at
/root/php-src/ext/mbstring/mbstring.c:2983
#7 0x00007f9368c894dd in php_mb_convert_encoding (input=0x7f936958df18
"U\226\307h\223\177", length=94, _to_encoding=0x7f93694a0918 "utf8",
_from_encodings=0x7f93694d86d8 "ASCII",
output_len=0x7ffe7269b908) at
/root/php-src/ext/mbstring/mbstring.c:3057
#8 0x00007f9368c89cb5 in zif_mb_convert_encoding
(execute_data=0x7f936941e750, return_value=0x7f936941e510) at
/root/php-src/ext/mbstring/mbstring.c:3189
#9 0x000000000095dab0 in ZEND_DO_FCALL_BY_NAME_SPEC_RETVAL_USED_HANDLER
() at /root/php-7.3.1/Zend/zend_vm_execute.h:892
#10 0x00000000009c528e in execute_ex (ex=0x7f936941e030) at
/root/php-7.3.1/Zend/zend_vm_execute.h:55434
#11 0x00000000009ca890 in zend_execute (op_array=0x7f936947a300,
return_value=0x0) at /root/php-7.3.1/Zend/zend_vm_execute.h:60834
#12 0x00000000008fa6d4 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /root/php-7.3.1/Zend/zend.c:1568
#13 0x000000000086ab0c in php_execute_script
(primary_file=0x7ffe7269f0a0) at /root/php-7.3.1/main/main.c:2630
#14 0x00000000009cd269 in do_cli (argc=5, argv=0x18f2930) at
/root/php-7.3.1/sapi/cli/php_cli.c:997
#15 0x00000000009ce1d5 in main (argc=5, argv=0x18f2930) at
/root/php-7.3.1/sapi/cli/php_cli.c:1389
Can someone help me out?...
Thank you all.
--
Edit bug report at https://bugs.php.net/bug.php?id=77692&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77692&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77692&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77692&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=77692&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=77692&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=77692&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=77692&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=77692&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=77692&r=support
Expected behavior: https://bugs.php.net/fix.php?id=77692&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=77692&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=77692&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=77692&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77692&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=77692&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=77692&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=77692&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=77692&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=77692&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=77692&r=mysqlcfg