[ruby-talk:02497] Re: Possible problem with GC on 1.5.3 (PR#2)

From: matz@... (Yukihiro Matsumoto)
Date: 2000-04-17 15:35:06 UTC
List: ruby-talk #2497


In message "Possible problem with GC on 1.5.3 (PR#2)"
    on 00/04/18, Dave@thomases.com <Dave@thomases.com> writes:

|Running the following on ruby 1.5.3 (2000-04-11) [i686-linux]

|    t.rb:10: [BUG] Segmentation fault
|    zsh: abort      ruby -w t.rb

Here's the patch.

--- eval.c	2000/04/10 05:44:06	1.39
+++ eval.c	2000/04/17 15:33:43
@@ -6361,4 +6361,6 @@
     if (th->status != THREAD_KILLED) {
-	th->prev->next = th->next;
-	th->next->prev = th->prev;
+	if (th->prev)
+	    th->prev->next = th->next;
+	if (th->next)
+	    th->next->prev = th->prev;
     }

In This Thread

Prev Next