From: nobu.nakada@... Date: 2004-06-02T20:26:41+09:00 Subject: [ruby-dev:23665] Re: SEGV eval.c: file = data->frame.node->nd_file なかだです。 At Thu, 27 May 2004 17:28:25 +0900, NAKAMURA, Hiroshi wrote in [ruby-dev:23643]: > ずっと、GW前後のversionで動かしてたんですが、2004-05-26(上記1.666が入っ > た直後)にrubyを上げたら、しばらく動いたあと、何回目かにwikiで書き込んだ > タイミングで、 > 1. busy loopでだんまり > 2. core吐いて落ちる > のいずれかになるようになりました。30分くらいは書き込んでも普通に動くから > タチが悪い。 これのようです。 Fri May 14 22:08:38 2004 Yukihiro Matsumoto * string.c (rb_str_new4): should not reuse frozen shared string if the original is not an instance of String. [ruby-talk:100193] このパッチで、少なくともtDiaryは落ちなくなりました。 * string.c (str_new4): should share shared instance if it already exists. Index: string.c =================================================================== RCS file: /cvs/ruby/src/ruby/string.c,v retrieving revision 1.192 diff -u -2 -p -r1.192 string.c --- string.c 14 May 2004 16:39:15 -0000 1.192 +++ string.c 2 Jun 2004 11:16:03 -0000 @@ -144,7 +144,7 @@ str_new4(klass, str) RSTRING(str2)->len = RSTRING(str)->len; RSTRING(str2)->ptr = RSTRING(str)->ptr; - if (FL_TEST(str, ELTS_SHARED) && !RSTRING(str)->aux.shared) { - /* ptr should be null_str */ + if (FL_TEST(str, ELTS_SHARED)) { FL_SET(str2, ELTS_SHARED); + RSTRING(str2)->aux.shared = RSTRING(str)->aux.shared; } else { @@ -166,5 +166,4 @@ rb_str_new4(orig) if (FL_TEST(orig, ELTS_SHARED) && (str = RSTRING(orig)->aux.shared) && klass == RBASIC(str)->klass) { long ofs; - str = RSTRING(orig)->aux.shared; ofs = RSTRING(str)->len - RSTRING(orig)->len; if (ofs > 0) { -- --- 僕の前にBugはない。 --- 僕の後ろにBugはできる。 中田 伸悦