[PHP-dev 830]Re: FYI:mbstring+鬼車 参考実装
Rui Hirokawa
rui_hirokawa @ ybb.ne.jp
2003年 7月 29日 (火) 14:01:13 JST
廣川です。
遅くなりましたが、ext/mbstring/tests/のテストケースで
テストしてみました。
以下の2つのケース以外はOKのようです。
mb_ereg_search_xxx.phpt
mb_regex_set_options.phpt
mb_regex_set_options.phptについては、
mb_regex_set_options( '' );
とした時の出力が異なりますが、option=0の時の動作が
従来と異なるということでしょうか?
mb_regex_set_options.phptに関連して、私の環境(Vine 2.6)では、
<?php
mb_ereg_search_init("abc",'a', '');
?>
というスクリプトでSegmentation faultを発生します。
メモリ開放時にこけているようです。
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 9606)]
__pthread_mutex_lock (mutex=0xc4830cfc) at mutex.c:99
99 mutex.c: No such file or directory.
in mutex.c
(gdb) where
#0 __pthread_mutex_lock (mutex=0xc4830cfc) at mutex.c:99
#1 0x40223fcf in __libc_free (mem=0x82e3540) at malloc.c:3152
#2 0x080a59f3 in php_mb_regex_free (reg=0x82e3540)
at /home/rui/work/php/src/php5-i18n/ext/mbstring/oniguruma/regcomp.c:4286
#3 0x08098904 in php_mb_regex_free_cache (pre=0x82e3304)
at /home/rui/work/php/src/php5-i18n/ext/mbstring/php_mbregex.c:44
#4 0x081dec5a in zend_hash_clean (ht=0x8284408)
at /home/rui/work/php/src/php5-i18n/Zend/zend_hash.c:536
#5 0x08098a5f in zm_deactivate_mb_regex (type=1, module_number=9)
at /home/rui/work/php/src/php5-i18n/ext/mbstring/php_mbregex.c:117
#6 0x080919d0 in zm_deactivate_mbstring (type=1, module_number=9)
at /home/rui/work/php/src/php5-i18n/ext/mbstring/mbstring.c:856
#7 0x081dc279 in module_registry_cleanup (module=0x82c9fc8)
at /home/rui/work/php/src/php5-i18n/Zend/zend_API.c:1327
#8 0x081df097 in zend_hash_apply (ht=0x8288900,
apply_func=0x81dc23c <module_registry_cleanup>)
at /home/rui/work/php/src/php5-i18n/Zend/zend_hash.c:655
#9 0x081d86c5 in zend_deactivate_modules ()
at /home/rui/work/php/src/php5-i18n/Zend/zend.c:780
#10 0x0819d2ae in php_request_shutdown (dummy=0x0)
at /home/rui/work/php/src/php5-i18n/main/main.c:1160
#11 0x08201639 in main (argc=2, argv=0xbffff744)
at /home/rui/work/php/src/php5-i18n/sapi/cli/php_cli.c:1018
#12 0x401ca13f in __libc_start_main (main=0x82006d8 <main>, argc=2, ubp_av=0xbffff744,
init=0x806cd44 <_init>, fini=0x8201ee0 <_fini>, rtld_fini=0x4000c770 <_dl_fini>,
stack_end=0xbffff73c) at ../sysdeps/generic/libc-start.c:129
--
Rui Hirokawa <rui_hirokawa @ ybb.ne.jp>
PHP-dev メーリングリストの案内