* ext/json/fbuffer/fbuffer.h (fbuffer_append_str): change the place of
RB_GC_GUARD. it should be after the object is used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b309a3698d
commit
cac2f455a9
@ -1,3 +1,8 @@
|
|||||||
|
Fri Jun 7 13:25:27 2013 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* ext/json/fbuffer/fbuffer.h (fbuffer_append_str): change the place of
|
||||||
|
RB_GC_GUARD. it should be after the object is used.
|
||||||
|
|
||||||
Fri Jun 7 13:22:43 2013 NARUSE, Yui <naruse@ruby-lang.org>
|
Fri Jun 7 13:22:43 2013 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* gc.c (before_gc_sweep): noinline can also avoid the segv instead of
|
* gc.c (before_gc_sweep): noinline can also avoid the segv instead of
|
||||||
|
@ -117,9 +117,9 @@ static void fbuffer_append_str(FBuffer *fb, VALUE str)
|
|||||||
const char *newstr = StringValuePtr(str);
|
const char *newstr = StringValuePtr(str);
|
||||||
unsigned long len = RSTRING_LEN(str);
|
unsigned long len = RSTRING_LEN(str);
|
||||||
|
|
||||||
RB_GC_GUARD(str);
|
|
||||||
|
|
||||||
fbuffer_append(fb, newstr, len);
|
fbuffer_append(fb, newstr, len);
|
||||||
|
|
||||||
|
RB_GC_GUARD(str);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user