[#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-10 14:05:35 UTC
List: ruby-core #3374
nobu.nokada@softhome.net wrote:
(2004/09/10 10:22)

>>   VALUE v = ......
>> 
>>   /* GC happened!! before assigned to volatile */
>> 
>>   rb_ensure(......, v); /* v is volatile VALUE */
>> 
>> is safe?
>
>In that case, v should be stored somewhere in the function and
>subsequent function calls, perhaps on the stack or in a
>register, anyway possible to be restored and scannable by GC.
>Otherwise it can't be used at calling rb_ensure().  So I think
>it's safe.
>
>There is a potential danger only when the VALUE is no longer
>used after any use of its internal pointer.  Since data2 in
>rb_ensure() is used only once at calling e_proc, it may not be
>a "barrier" in the proc and the proc has to keep it in mind.

I understand. Well, in ruby.h many VALUE arguments exists, should
only 4th argument of rb_rescue2 be volatile? I'm not sure
which one should be volatile, so I hope nobu or matz decides it.

VALUE rb_each _((VALUE));
VALUE rb_yield _((VALUE));
VALUE rb_yield_values __((int n, ...));
VALUE rb_yield_splat _((VALUE));
int rb_block_given_p _((void));
VALUE rb_iterate _((VALUE(*)(VALUE),VALUE,VALUE(*)(ANYARGS),VALUE));
VALUE rb_rescue _((VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE));
VALUE rb_rescue2 __((VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE,...));
VALUE rb_ensure _((VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE));
VALUE rb_catch _((const char*,VALUE(*)(ANYARGS),VALUE));
NORETURN(void rb_throw _((const char*,VALUE)));

In This Thread