[PHP-users 17411]Re: str_suffleで即落ち

Seiji Masugata s.masugata @ digicom.dnp.co.jp
2003年 8月 21日 (木) 13:40:12 JST


こんにちわ、桝形です。

> > > > > http://bugs.php.net/bug.php?id=25170
> > > > 
> > > > ちゅ〜か、速攻で返答があったんですけど、backtraceを頂戴って
> > > > --enable-debugしてね〜コンパイルやり直しかぃ。(--;
> 
> --enable-debug でコンパイルし直したのですが、backtrace って
> どう取り出すのでしょうか? > マニュアルを読めですね....

自分がやった手順として、

---------------------------------------------------------------------

【1】Aapcheを停止。

【2】「/usr/local/bin/gdb /usr/local/apache/bin/httpd」を実行。

【3】「run -X -f /usr/local/apache/conf/httpd.conf」を実行。

【4】ブラウザから問題のあるURLにアクセス。
      ここで、問題があれば何か出力されます。
      下記の様な感じが出力されます。

Program received signal SIGSEGV, Segmentation fault.
0xee5fd140 in php_string_shuffle (str=0x174408 "abcdef", len=6) at
/usr/local/src/php-4.3.3RC4/ext/standard/string.c:4010
4010                            str[n_left] = str[rnd_idx];

【5】btとタイプ(  自分がやったのはwhereでしたけど )。
      下記の様な感じが出力されます。

#0  0xee5fd140 in php_string_shuffle (str=0x174408 "abcdef", len=6) at
/usr/local/src/php-4.3.3RC4/ext/standard/string.c:4010
#1  0xee5fd360 in zif_str_shuffle (ht=1, return_value=0x1743c0,
this_ptr=0x0, return_value_used=1)
    at /usr/local/src/php-4.3.3RC4/ext/standard/string.c:4031
#2  0xee6fc7e4 in execute (op_array=0x1740e0) at
/usr/local/src/php-4.3.3RC4/Zend/zend_execute.c:1616
#3  0xee6df92c in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /usr/local/src/php-4.3.3RC4/Zend/zend.c:885
#4  0xee680900 in php_execute_script (primary_file=0xeffff310) at
/usr/local/src/php-4.3.3RC4/main/main.c:1721
#5  0xee703874 in apache_php_module_main (r=0x15d8e8,
display_source_mode=0)
    at /usr/local/src/php-4.3.3RC4/sapi/apache/sapi_apache.c:54
#6  0xee7050b8 in send_php (r=0x15d8e8, display_source_mode=0,
filename=0x15e960 "/WWW/Web/gaia/Masugata/test.php")
    at /usr/local/src/php-4.3.3RC4/sapi/apache/mod_php4.c:620
#7  0xee70513c in send_parsed_php (r=0x15d8e8) at
/usr/local/src/php-4.3.3RC4/sapi/apache/mod_php4.c:635
#8  0x0001ef38 in ap_invoke_handler ()
#9  0x0003e060 in process_request_internal ()
#10 0x0003e0e4 in ap_process_request ()
#11 0x00030bf8 in child_main ()
#12 0x00030e8c in make_child ()
#13 0x000310a8 in startup_children ()
#14 0x00031adc in standalone_main ()
#15 0x00032738 in main ()

【6】4と5の出力結果をバグレポートと共に提出。

---------------------------------------------------------------------

です、何かの参考になれば幸いです。

> > 恐らく、Built On: Aug 21, 2003 01:30 GMTのもので、確認できると
> > 思いますので、お手数ですが、ご確認して頂ければ。。。と思います。
> > 
> 
> php4-STABLE-200308210130 で、
> 
> SunOS 5.8 Generic_108528-15 sun4m sparc
> SunOS 5.8 Generic_108529-18 i86pc i386 i86pc
> の両方とも(コンパイルオプション省略)
> http://jp.php.net/manual/ja/function.str-shuffle.php
> のサンプルソースを、コマンドライン
> 
> $ php -f strshuffle.php
> decbaf
> 
> で、正常動作を確認いたしました。

確認して頂き、ありがとうございます。
こちらの環境「SunOS 5.6 sparc」でも問題ない事を確認できました。

--
Seiji Masugata<s.masugata @ digicom.dnp.co.jp>




PHP-users メーリングリストの案内