[#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: Yukihiro Matsumoto <matz@...>
Date: 2004-09-14 08:26:28 UTC
List: ruby-core #3393
Hi,

In message "Re: [PATCH] dir.c --- Dir.chdir error handling"
    on Tue, 14 Sep 2004 16:08:23 +0900, H.Yamamoto <ocean@m2.ccsnet.ne.jp> writes:

|ruby's GC uses stack and register as root, and trace reference from root and marks them.
|Finally, frees unmarked object. The problem is, sometimes compiler removes VALUE
|>from stack and register despite it's still in scope. 
|If all refrences are removed like that, corresponding object are freed wrongly. right?

Right.

|> 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
|
|But, there is possibility of inline expansion. If rb_fooboo and func2 and func3
|are simpile enough, they can be all expanded to somefunc() like this.

<snip example>

Your example is exactly the case I stated in [ruby-talk:03385], and I
believe the somefunc should protect VALUE using volatile.

|And if s is optimized out. all references to ruby string "foo" disappers,
|and GC may destroy the object. If s is volatile, there is not any chance
|to erase all references because one of them is volatile. (Am I wrong?)

Right.

|And if we have to keep only one refernce to stack or register, is there better
|place to do it than after object creation?

I'm not sure what you meant.  Where's "there"?

|Anyway, I was told gcc -O3 or more shouldn't be used
|because too much optimization will break GC. Doesn't that mean protection is not enough?

I don't know.  Maybe -O3 optimized out VALUEs forgotten to be
protected. 

							matz.

In This Thread