diff --git a/ChangeLog b/ChangeLog index 680489b568..6d1f4f558b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Wed Dec 19 23:36:12 2012 Naohisa Goto + + * marshal.c (marshal_dump, marshal_load): fix SEGV during make rdoc + and test failure in TestMarshal#test_gc and test_context_switch + on SPARC Solaris 10 compiled with Oracle Solaris Studio 12.3. + [Bug #7591] [ruby-dev:46772] + Wed Dec 19 19:34:03 2012 Nobuyoshi Nakada * object.c (rb_mod_const_get): nul byte is invalid as constant name. diff --git a/marshal.c b/marshal.c index 8c60e5d80a..d58380581e 100644 --- a/marshal.c +++ b/marshal.c @@ -934,7 +934,7 @@ marshal_dump(int argc, VALUE *argv) else if (NIL_P(a1)) io_needed(); else port = a1; } - wrapper = TypedData_Make_Struct(rb_cData, struct dump_arg, &dump_arg_data, arg); + RB_GC_GUARD(wrapper) = TypedData_Make_Struct(rb_cData, struct dump_arg, &dump_arg_data, arg); arg->dest = 0; arg->symbols = st_init_numtable(); arg->data = st_init_numtable(); @@ -1907,7 +1907,7 @@ marshal_load(int argc, VALUE *argv) else { io_needed(); } - wrapper = TypedData_Make_Struct(rb_cData, struct load_arg, &load_arg_data, arg); + RB_GC_GUARD(wrapper) = TypedData_Make_Struct(rb_cData, struct load_arg, &load_arg_data, arg); arg->infection = infection; arg->src = port; arg->offset = 0;