[#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: Yukihiro Matsumoto <matz@...>
Date: 2004-09-06 09:13:43 UTC
List: ruby-core #3354
Hi,

In message "Re: [PATCH] dir.c --- Dir.chdir error handling"
    on Mon, 6 Sep 2004 17:28:46 +0900, nobu.nokada@softhome.net writes:

|Rather, shouldn't rb_ensure guarantee the argument?

Hmm, you mean like this?

--- dir.c	19 Aug 2004 07:33:15 -0000	1.125
+++ dir.c	6 Sep 2004 09:12:59 -0000
@@ -690,2 +689,13 @@ static VALUE chdir_thread = Qnil;
 static VALUE
+chdir_yield(args)
+    VALUE *args;
+{
+    VALUE dist = args[0];
+    VALUE path = args[1];
+
+    dir_chdir(dist);
+    return rb_yield(path);
+}
+
+static VALUE
 chdir_restore(path)
@@ -697,3 +707,2 @@ chdir_restore(path)
     dir_chdir(path);
-    free(path);
     return Qnil;
@@ -769,2 +778,4 @@ dir_s_chdir(argc, argv, obj)
 	char *cwd = my_getcwd();
+	VALUE args[2];
+
 	chdir_blocking++;
@@ -772,4 +783,5 @@ dir_s_chdir(argc, argv, obj)
 	    chdir_thread = rb_thread_current();
-	dir_chdir(dist);
-	return rb_ensure(rb_yield, path, chdir_restore, (VALUE)cwd);
+	args[0] = dist;
+	args[1] = path;
+	return rb_ensure(chdir_yield, (VALUE)args, chdir_restore, (VALUE)cwd);
     }

In This Thread