Project

General

Profile

Backport #9206 ยป fix_to_unprotected_FL_MARK.patch

authorNari (Narihiro Nakamura), 12/03/2013 08:13 PM

View differences:

ChangeLog
Tue Dec 3 18:36:42 2013 Narihiro Nakamura <authornari@gmail.com>
* object.c (rb_obj_clone): protect FL_MARK of a dest object. A lazy
sweeper free up a dest object if a marker is invoked immediately
following allocate a dest object in rb_obj_alloc().
Fri Nov 22 12:44:56 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* util.c (ruby_strtod): ignore too long fraction part, which does not
object.c
}
clone = rb_obj_alloc(rb_obj_class(obj));
RBASIC(clone)->klass = rb_singleton_class_clone(obj);
RBASIC(clone)->flags = (RBASIC(obj)->flags | FL_TEST(clone, FL_TAINT) | FL_TEST(clone, FL_UNTRUSTED)) & ~(FL_FREEZE|FL_FINALIZE|FL_MARK);
RBASIC(clone)->flags = (RBASIC(obj)->flags | FL_TEST(clone, FL_TAINT) | FL_TEST(clone, FL_UNTRUSTED)) & ~(FL_FREEZE|FL_FINALIZE|FL_MARK) | (RBASIC(clone)->flags&FL_MARK);
init_copy(clone, obj);
rb_funcall(clone, id_init_clone, 1, obj);
RBASIC(clone)->flags |= RBASIC(obj)->flags & FL_FREEZE;
    (1-1/1)