1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* marshal.c (mark_dump_arg, mark_load_arg): ignore already cleaned

data.  [ruby-core:25969]

* marshal.c (clear_dump_arg, clear_load_arg): clear freed fields.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-10-07 07:42:30 +00:00
parent d167cfd196
commit 90ce6d2323
2 changed files with 13 additions and 2 deletions

View file

@ -1,3 +1,10 @@
Wed Oct 7 16:42:28 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* marshal.c (mark_dump_arg, mark_load_arg): ignore already cleaned
data. [ruby-core:25969]
* marshal.c (clear_dump_arg, clear_load_arg): clear freed fields.
Wed Oct 7 16:06:30 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* include/ruby/ruby.h (rb_long2int): evalates the argument only

View file

@ -162,7 +162,7 @@ static void
mark_dump_arg(void *ptr)
{
struct dump_arg *p = ptr;
if (!ptr)
if (!p->symbols)
return;
rb_mark_set(p->data);
rb_mark_hash(p->compat_tbl);
@ -850,7 +850,9 @@ clear_dump_arg(struct dump_arg *arg)
st_free_table(arg->symbols);
arg->symbols = 0;
st_free_table(arg->data);
arg->data = 0;
st_free_table(arg->compat_tbl);
arg->compat_tbl = 0;
if (arg->encodings) {
st_free_table(arg->encodings);
arg->encodings = 0;
@ -974,7 +976,7 @@ static void
mark_load_arg(void *ptr)
{
struct load_arg *p = ptr;
if (!ptr)
if (!p->symbols)
return;
rb_mark_tbl(p->data);
rb_mark_hash(p->compat_tbl);
@ -1714,7 +1716,9 @@ clear_load_arg(struct load_arg *arg)
st_free_table(arg->symbols);
arg->symbols = 0;
st_free_table(arg->data);
arg->data = 0;
st_free_table(arg->compat_tbl);
arg->compat_tbl = 0;
}
/*