[#9445] thread.rb — m_seki@...

18 messages 2000/03/16
[#9446] Re: thread.rb — matz@... (Yukihiro Matsumoto) 2000/03/17

[#9460] Re: thread.rb — m_seki@... 2000/03/21

[#9462] Re: thread.rb — matz@... (Yukihiro Matsumoto) 2000/03/21

まつもと ゆきひろです

[#11281] Re: thread.rb — Masatoshi SEKI <m_seki@...> 2000/10/22

[#9498] timeout しない timeout — ARIMA Yasuhiro <fit0298@...>

有馬です。

20 messages 2000/03/26
[#9506] Re: timeout しない timeout — matz@... (Yukihiro Matsumoto) 2000/03/27

まつもと ゆきひろです

[#9509] Re: timeout しない timeout — gotoken@... (GOTO Kentaro) 2000/03/27

In message "[ruby-dev:9506] Re: timeout しない timeout"

[ruby-dev:9344] Re: [fix] String#* with huge string

From: Katsuyuki Komatsu <komatsu@...>
Date: 2000-03-02 05:41:32 UTC
List: ruby-dev #9344
小松です。

In the message of [ruby-dev:9290] [fix] String#* with huge string
    on 2000/2/26 22:54:32 EGUCHI Osamu <eguchi@shizuokanet.ne.jp> wrote:
|稀なパターンですが、文字列を増殖させる時に SEGV します。

make testが失敗するので何かと思ったら、len == 0のチェックが
必要なようです。

% ruby-1.4.4 -ve "p '-' * 0 == ''"
ruby 1.4.4 (2000-03-02) [sparc-solaris2.5.1]
浮動小数点例外 (コアダンプしました。)
% 

diff -ru2p ruby-1.4.4.dist/string.c ruby-1.4.4/string.c
--- ruby-1.4.4.dist/string.c	Thu Mar  2 12:51:45 2000
+++ ruby-1.4.4/string.c	Thu Mar  2 14:35:04 2000
@@ -266,5 +266,5 @@ rb_str_times(str, times)
 	rb_raise(rb_eArgError, "negative argument");
     }
-    if (LONG_MAX / len <  RSTRING(str)->len) {
+    if (len && LONG_MAX / len < RSTRING(str)->len) {
 	rb_raise(rb_eArgError, "argument too big");
     }

--
小松克行 / Katsuyuki Komatsu <komatsu@sarion.co.jp>

In This Thread