[#3419] Valgrind analysis of [BUG] unknown node type 0 — Andrew Walrond <andrew@...>

Hello list,

19 messages 2004/09/17
[#3422] Re: Valgrind analysis of [BUG] unknown node type 0 — ts <decoux@...> 2004/09/17

>>>>> "A" == Andrew Walrond <andrew@walrond.org> writes:

[#3423] Re: Valgrind analysis of [BUG] unknown node type 0 — Andrew Walrond <andrew@...> 2004/09/17

On Friday 17 Sep 2004 12:01, ts wrote:

[#3424] Re: Valgrind analysis of [BUG] unknown node type 0 — ts <decoux@...> 2004/09/17

>>>>> "A" == Andrew Walrond <andrew@walrond.org> writes:

[#3425] Re: Valgrind analysis of [BUG] unknown node type 0 — Andrew Walrond <andrew@...> 2004/09/17

On Friday 17 Sep 2004 12:37, ts wrote:

[#3426] Re: Valgrind analysis of [BUG] unknown node type 0 — ts <decoux@...> 2004/09/17

>>>>> "A" == Andrew Walrond <andrew@walrond.org> writes:

[#3428] Re: Valgrind analysis of [BUG] unknown node type 0 — Andrew Walrond <andrew@...> 2004/09/17

On Friday 17 Sep 2004 13:05, ts wrote:

[#3429] Re: Valgrind analysis of [BUG] unknown node type 0 — ts <decoux@...> 2004/09/17

>>>>> "A" == Andrew Walrond <andrew@walrond.org> writes:

Re: [PATCH] dir.c --- Dir.chdir error handling

From: ts <decoux@...>
Date: 2004-09-13 14:51:23 UTC
List: ruby-core #3387
>>>>> "H" == H Yamamoto <ocean@m2.ccsnet.ne.jp> writes:

H> And move to func2, func3.... mostly object will be protected with volatile or
H> touched with OBJ_INFECT() or StringValue() somewhere, but there is possibility
H> none of the functions won't protect it. I think [ruby-dev:19854] is such bug.

 Well, not really : in [ruby-dev:19854] there is a problem because `args'
 was in a register, ruby has stored a new value in it and then removed the
 object from the register to make the call to method_call() (probably
 replaced with RARRAY(args)->ptr)

 When ruby call the GC (in method_call()) it will not mark `args' and it will
 free RARRAY(args)->ptr which is used by method_call()

 The effect of volatile in this case is to put `args2' in the stack, this
 will give the possibility to ruby to mark it.

 In your example, you constantly work with an object `v' and not the content
 of the object, like RARRAY(v)->ptr. This mean that this object `v' will be
 in a register or in the stack (ruby need it) and it will marked by the GC



Guy Decoux

In This Thread