ruby-changes:10334
From: yugui <ko1@a...>
Date: Fri, 30 Jan 2009 02:12:36 +0900 (JST)
Subject: [ruby-changes:10334] Ruby:r21878 (ruby_1_9_1): merges r21861 from trunk into ruby_1_9_1.
yugui 2009-01-30 02:12:16 +0900 (Fri, 30 Jan 2009) New Revision: 21878 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21878 Log: merges r21861 from trunk into ruby_1_9_1. * ext/zlib/zlib.c (zstream_run): previous change didn't resolve the problem. Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/ext/zlib/zlib.c Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 21877) +++ ruby_1_9_1/ChangeLog (revision 21878) @@ -1,3 +1,8 @@ +Thu Jan 29 00:24:48 2009 NAKAMURA Usaku <usa@r...> + + * ext/zlib/zlib.c (zstream_run): previous change didn't resolve the + problem. + Fri Jan 30 01:39:27 2009 Yusuke Endoh <mame@t...> * parse.y (top_compstmt, top_stmts, top_stmt): prohibit BEGIN {} in Index: ruby_1_9_1/ext/zlib/zlib.c =================================================================== --- ruby_1_9_1/ext/zlib/zlib.c (revision 21877) +++ ruby_1_9_1/ext/zlib/zlib.c (revision 21878) @@ -708,7 +708,7 @@ /* keep reference to `z->input' so as not to be garbage collected after zstream_reset_input() and prevent `z->stream.next_in' from dangling. */ - RB_GC_GUARD(guard) = z->input; + guard = z->input; } if (z->stream.avail_out == 0) { @@ -716,6 +716,9 @@ } for (;;) { + /* VC allocates err and guard to same address. accessing err and guard + in same scope prevents it. */ + RB_GC_GUARD(guard); n = z->stream.avail_out; err = z->func->run(&z->stream, flush); z->buf_filled += n - z->stream.avail_out; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/