[#29911] [Bug #3231] Digest Does Not Build — Charlie Savage <redmine@...>

Bug #3231: Digest Does Not Build

19 messages 2010/05/01

[#29920] [Feature #3232] Loops (while/until) should return last statement value if any, like if/unless — Benoit Daloze <redmine@...>

Feature #3232: Loops (while/until) should return last statement value if any, like if/unless

9 messages 2010/05/01

[#29997] years in Time.utc — Xavier Noria <fxn@...>

Does anyone have a precise statement about the years supported by

13 messages 2010/05/04

[#30010] [Bug #3248] extension 'tk' is finding tclConfig.sh and tkConfig.sh incorrectly — Luis Lavena <redmine@...>

Bug #3248: extension 'tk' is finding tclConfig.sh and tkConfig.sh incorrectly

9 messages 2010/05/05

[#30226] [Bug #3288] Segmentation fault - activesupport-3.0.0.beta3/lib/active_support/callbacks.rb:88 — Szymon Jeż <redmine@...>

Bug #3288: Segmentation fault - activesupport-3.0.0.beta3/lib/active_support/callbacks.rb:88

10 messages 2010/05/13

[#30358] tk doesn't startup well in doze — Roger Pack <rogerdpack2@...>

Currently with 1.9.x and tk 8.5,the following occurs

12 messages 2010/05/22

[ruby-core:29975] Re: [Bug #3241] gem update --system Segmentation fault

From: Yusuke ENDOH <mame@...>
Date: 2010-05-03 17:48:50 UTC
List: ruby-core #29975
2010/5/4 Aaron Patterson <aaron@tenderlovemaking.com>:
> I think this is a duplicate of [ruby-core:29874].  I've been able to get
> the same stack trace with this program:
>
>    GC.stress = true
>    require 'nokogiri'
>
> It seems to only happen when requiring gems.


Thank you for your narrowing down the bug!
I believe that the following patch works well:

diff --git a/string.c b/string.c
index caca178..dea5339 100644
--- a/string.c
+++ b/string.c
@@ -613,8 +613,8 @@ str_replace_shared(VALUE str2, VALUE str)
 	STR_SET_EMBED_LEN(str2, RSTRING_LEN(str));
     }
     else {
-	FL_SET(str2, STR_NOEMBED);
 	str = rb_str_new_frozen(str);
+	FL_SET(str2, STR_NOEMBED);
 	RSTRING(str2)->as.heap.len = RSTRING_LEN(str);
 	RSTRING(str2)->as.heap.ptr = RSTRING_PTR(str);
 	RSTRING(str2)->as.heap.aux.shared = str;

-- 
Yusuke Endoh <mame@tsg.ne.jp>

In This Thread