[#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: "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
Date: 2004-09-14 10:39:08 UTC
List: ruby-core #3394
>|> 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.

No, I meant compiler optimization "inline expansion". So, please imagine
that code was expanded by compiler automatically.

>|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"?

I meant "is there any better place to do it than after object creation?".
Sorry, my English was strange.
Because that is start point of object reference's trip, I think it's best place.

>|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. 

I read that first at http://i.loveruby.net/ja/rhg/cd/build.html. (Sorry it's written in Japanese)

And [ruby-talk:68531] or [ruby-talk:110826]. (nobu said this can be gcc's bug though)

///////////////////////////////

But I also think it's hard to accept

  volatile VALUE v1 = rb_str_new2("foo");
  volatile VALUE v2 = rb_str_new2("boo");
  rb_fooboo(v1, v2);

instead of

  rb_fooboo(rb_str_new2("foo"), rb_str_new2("boo"));


In This Thread