[#1378] differences between Module and Class ? — Mathieu Bouchard <matju@...>

25 messages 2003/08/11
[#1387] Re: differences between Module and Class ? — matz@... (Yukihiro Matsumoto) 2003/08/12

Hi,

[#1442] Re: differences between Module and Class ? — Mathieu Bouchard <matju@...> 2003/08/21

[#1406] _id2ref bug? — Ryan Pavlik <rpav@...>

While debugging some caching code, I've come across a segfault related

22 messages 2003/08/14
[#1407] Re: _id2ref bug? — matz@... (Yukihiro Matsumoto) 2003/08/14

Hi,

[#1413] Re: _id2ref bug? (REPRODUCED, short) — Ryan Pavlik <rpav@...> 2003/08/14

On Fri, 15 Aug 2003 01:57:18 +0900

Re: _id2ref bug?

From: matz@... (Yukihiro Matsumoto)
Date: 2003-08-14 17:08:50 UTC
List: ruby-core #1410
Hi,

In message "Re: _id2ref bug?"
    on 03/08/15, ts <decoux@moulon.inra.fr> writes:

| It has a finalizer and it's in a "freeing page" : this case is possible ?
| If yes, flags is not set to 0 and this can explain the problem

It is very possible.  It should be checked by "RBASIC(ptr)->klass == 0".
Thank you.

Still wondering if this solve his problem.

							matz.

--- gc.c	6 Aug 2003 21:50:05 -0000	1.153
+++ gc.c	14 Aug 2003 17:08:26 -0000
@@ -1640,3 +1640,3 @@ id2ref(obj, id)
     }
-    if (BUILTIN_TYPE(ptr) == 0) {
+    if (RBASIC(ptr)->klass == 0) {
 	rb_raise(rb_eRangeError, "0x%lx is recycled object", p0);

In This Thread