[#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-06 03:04:53 UTC
List:
ruby-core #3351
Hello.
> if (rb_block_given_p()) {
> char *cwd = my_getcwd();
> dir_chdir(dist);
> chdir_blocking++;
> if (chdir_thread == Qnil)
> chdir_thread = rb_thread_current();
> return rb_ensure(rb_yield, path, chdir_restore, (VALUE)cwd);
> }
> dir_chdir(dist);
I think memory `cwd' leaks when dir_chdir raised exception. (chdir_restore has same issue)
I created kind of patch, but copy tmp => cwd looks a little agry....
Index: dir.c
===================================================================
RCS file: /var/cvs/src/ruby/dir.c,v
retrieving revision 1.125
diff -u -w -b -p -r1.125 dir.c
--- dir.c 19 Aug 2004 07:33:15 -0000 1.125
+++ dir.c 6 Sep 2004 02:59:41 -0000
@@ -689,13 +689,12 @@ static VALUE chdir_thread = Qnil;
static VALUE
chdir_restore(path)
- char *path;
+ VALUE path;
{
chdir_blocking--;
if (chdir_blocking == 0)
chdir_thread = Qnil;
- dir_chdir(path);
- free(path);
+ dir_chdir(RSTRING(path)->ptr);
return Qnil;
}
@@ -766,12 +765,13 @@ dir_s_chdir(argc, argv, obj)
}
if (rb_block_given_p()) {
- char *cwd = my_getcwd();
+ char *tmp = my_getcwd();
+ VALUE cwd = rb_str_new2(tmp); free(tmp);
+ dir_chdir(dist);
chdir_blocking++;
if (chdir_thread == Qnil)
chdir_thread = rb_thread_current();
- dir_chdir(dist);
- return rb_ensure(rb_yield, path, chdir_restore, (VALUE)cwd);
+ return rb_ensure(rb_yield, path, chdir_restore, cwd);
}
dir_chdir(dist);