Project

General

Profile

Actions

Bug #2181

closed

Segmentation fault for test/drb/* -- possible bug in Marshal/GC

Added by nlugovoi (Nikolai Lugovoi) about 15 years ago. Updated over 13 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.2dev (2009-10-06) [i686-linux]
Backport:
[ruby-core:25969]

Description

=begin
After changeset r25230 in marshal.c I see some segfaults (at various places)when running make test-all or only test suite test/drb/*, see attached file test-crash.txt

Removing gc marks for elements of struct load_arg seems to fix the problem:

--- a/marshal.c
+++ b/marshal.c
@@ -971,16 +971,6 @@ check_load_arg(struct load_arg *arg, ID sym)
static void clear_load_arg(struct load_arg *arg);

static void
-mark_load_arg(void *ptr)
-{

  • struct load_arg *p = ptr;
  • if (!ptr)
  •    return;
    
  • rb_mark_tbl(p->data);
  • rb_mark_hash(p->compat_tbl);
    -}

-static void
free_load_arg(void *ptr)
{
clear_load_arg(ptr);
@@ -995,7 +985,7 @@ memsize_load_arg(const void *ptr)

static const rb_data_type_t load_arg_data = {
"load_arg",

  • mark_load_arg, free_load_arg, memsize_load_arg
  • NULL, free_load_arg, memsize_load_arg
    };

static VALUE r_entry(VALUE v, struct load_arg *arg);
=end


Files

test-crash.txt (7.9 KB) test-crash.txt nlugovoi (Nikolai Lugovoi), 10/06/2009 10:18 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0