Re: Segfault ( (Simpler Example)

From: nobu.nokada@...
Date: 2002-10-08 20:53:30 UTC
List: ruby-core #532
Hi,

At Wed, 9 Oct 2002 04:20:59 +0900,
Christoph wrote:
> The following simpler script crashes in the
> second loop with  ruby 1.7.3 (2002-10-07) on 
> [i386-cygwin], [i386-mswin32] and [i386-mingw32].

I could reproduce on i686-linux too.

# It might be better to make heaps and heaps_limits a struct.


Index: gc.c
===================================================================
RCS file: /cvs/ruby/src/ruby/gc.c,v
retrieving revision 1.105
diff -u -2 -p -r1.105 gc.c
--- gc.c	3 Oct 2002 11:23:34 -0000	1.105
+++ gc.c	8 Oct 2002 20:48:05 -0000
@@ -947,4 +947,5 @@ gc_sweep()
 	    if (i != j) {
 		heaps[j] = heaps[i];
+		heaps_limits[j] = heaps_limits[i];
 	    }
 	    j++;


-- 
Nobu Nakada

In This Thread