[#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-16 06:17:09 UTC
List: ruby-core #3414
>|Until now, my concern was just theory, but I could reproduce the problem
>|in real code... This simple code has potential bug.
>|
>|  rb_str_intern(rb_str_new2("foo"));
>
>The problem under artificial circumstance may not be a real problem.

What do you mean 'artificial'? This happens only if rb_str_intern is inlined
and xmalloc is called so many times. (because malloc_increase > malloc_limit is
satisfied)

Indeed, I put 'inline' keyword to rb_str_intern because VisaulC++ didn't expand it,
but anyway any compiler can expand it even without keyword. 

>|  rb_str_intern(rb_str_new2("foo"));
>
>is not a realistic usage of rb_str_intern() where we have
>rb_intern().

I can't believe you said that way. Can anyone predict

 rb_str_intern(rb_str_new2("foo"));

is dangerous? Yes, I know usually ruby works because I use it in dairy work.
It's because many factor disturbs optimaization, probably.

But there is potential danger even in such simple code. What if code is more complicated,
and ruby process is executed for long time? This was just example to convince you about issue,
but I couldn't.



In This Thread