ruby-changes:35655
From: nobu <ko1@a...>
Date: Mon, 29 Sep 2014 22:54:52 +0900 (JST)
Subject: [ruby-changes:35655] nobu:r47737 (trunk): string.c: fix NOFREE
nobu 2014-09-29 22:54:37 +0900 (Mon, 29 Sep 2014) New Revision: 47737 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47737 Log: string.c: fix NOFREE * string.c (str_make_independent_expand): drop NOFREE flag after reallocation, static buffer is not pointed anymore. [ruby-core:65317] [Bug #10304] Modified files: trunk/ChangeLog trunk/string.c Index: ChangeLog =================================================================== --- ChangeLog (revision 47736) +++ ChangeLog (revision 47737) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Mon Sep 29 22:54:39 2014 Nobuyoshi Nakada <nobu@r...> + + * string.c (str_make_independent_expand): drop NOFREE flag after + reallocation, static buffer is not pointed anymore. + [ruby-core:65317] [Bug #10304] + Sun Sep 28 23:59:17 2014 Kazuki Tsujimoto <kazuki@c...> * gc.c (rb_gcdebug_print_obj_condition): use RVALUE_REMEMBERED Index: string.c =================================================================== --- string.c (revision 47736) +++ string.c (revision 47737) @@ -1577,7 +1577,7 @@ str_make_independent_expand(VALUE str, l https://github.com/ruby/ruby/blob/trunk/string.c#L1577 memcpy(ptr, RSTRING_PTR(str), len); } STR_SET_NOEMBED(str); - FL_UNSET(str, STR_SHARED); + FL_UNSET(str, STR_SHARED|STR_NOFREE); TERM_FILL(ptr + len, termlen); RSTRING(str)->as.heap.ptr = ptr; RSTRING(str)->as.heap.len = len; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/