[#3358] Fwd: fastcgi & continuations (Re: Idea: Webshare) — Patrick May <patrick@...>
Hello,
8 messages
2004/09/09
[#3359] Re: Fwd: fastcgi & continuations (Re: Idea: Webshare)
— Eric Hodel <drbrain@...7.net>
2004/09/09
Patrick May (patrick@hexane.org) wrote:
[#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:
[#3430] Re: Valgrind analysis of [BUG] unknown node type 0
— Andrew Walrond <andrew@...>
2004/09/17
On Friday 17 Sep 2004 13:30, ts wrote:
[#3431] Re: Valgrind analysis of [BUG] unknown node type 0
— ts <decoux@...>
2004/09/17
>>>>> "A" == Andrew Walrond <andrew@walrond.org> writes:
[#3432] Re: Valgrind analysis of [BUG] unknown node type 0
— Andrew Walrond <andrew@...>
2004/09/17
On Friday 17 Sep 2004 13:50, ts wrote:
[#3433] Re: Valgrind analysis of [BUG] unknown node type 0
— Andrew Walrond <andrew@...>
2004/09/17
There is a minor flaw in my analysis toward the end; ignore previous email
[#3434] Re: Valgrind analysis of [BUG] unknown node type 0
— Andrew Walrond <andrew@...>
2004/09/17
On Friday 17 Sep 2004 13:50, ts wrote:
[#3437] Re: Valgrind analysis of [BUG] unknown node type 0
— Yukihiro Matsumoto <matz@...>
2004/09/17
Hi,
Re: [PATCH] dir.c --- Dir.chdir error handling
From:
"H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
Date:
2004-09-13 14:30:06 UTC
List:
ruby-core #3386
>|I think the safest way is to store object into volatile variable just after construction.
>|
>| volatile VALUE v = rb_str_new2("foo");
>|
>| foo(v); /* don't have to think about GC */
>|
>|but on this policy, we can't do this
>|
>| foo(rb_str_new2("foo"));
>|
>|.... totally.
>
>I'm not sure about your concern. If the string from rb_str_new()
>still used somewhere, it would not be treated as garbage. The only
>problem raises when you retrieve data from a VALUE, and forget about
>the original VALUE, e.g.
>
> VALUE s = rb_str_new2("foo");
> char *ptr = RSTRING(s)->ptr;
>
> .. no reference to s, but ptr ..
>
>In the cases like this, you must protect your VALUE explicitly (by
>volatile), but not for rb_rescue() arguments etc.
Well, what I concern is it's difficult to confirm that ruby object is really protected.
To confirm this, we must go down function call. That is,
void somefunc()
{
VALUE s = rb_str_new2("foo");
func1(s);
}
void func1(VALUE v) /* this function doesn't protect v explicitly, so that resposibility */
{ /* is for sub functions ... */
/* too complex codes here */
rb_fooboo(v);
if (/* ...... */)
{
func2(v, -1, 2, 3);
}
else
{
func3(1, v, rb_str_new2("foo"));
}
}
And move to func2, func3.... mostly object will be protected with volatile or
touched with OBJ_INFECT() or StringValue() somewhere, but there is possibility
none of the functions won't protect it. I think [ruby-dev:19854] is such bug.
(For example, rb_str_intern() is external function but it doesn't protect argument)
I feel it's safter to gurantee ruby-object's life at construction rather than
such chain of resposibility. Of cause, this aproach must have another problem....
>|but on this policy, we can't do this
>|
>| foo(rb_str_new2("foo"))