[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

Crash in openp().



堀口です. 適当につないでしまいますが..

> IME の問題については良く分かりませんが、openp() で落ちる問題が解決して
> いないのでまずいのではないでしょうか。
> 
> # 先日 meaedow-develop の方に投稿したパッチは不完全でしたので、現在修正


 すみません, 出したつもりがなぜか +draft に残留していました^^;
 とりあえずそのまま出しちゃいます. 


Reply to the message: <20060123.005406.207583750.boochang@xxxxxxxxxxxx>
====
> 以下の ChangeLog.Meadow のエントリを見るかぎりでは、rev4006 で
> sys_spawnve に導入された変数 decoded_program にも GC 対策が必要なのでは
> ないでしょうか?

 それはしたはずでは.. と思ったら..
 後のほうの処置が抜けていたようです. すみません.

> +      struct gcpro gcpro1;
> +
> +      GCPRO1 (decoded_program);

 programm もこの後で使うので仲間に入れてあげてください.

なのでこんな感じです. これで commit します.

Index: w32proc.c
===================================================================
--- w32proc.c	(revision 4012)
+++ w32proc.c	(working copy)
@@ -855,8 +855,15 @@
   {
     Lisp_Object func, arg, result, decoded_cmdname;
 
-    func = call1 (intern ("find-process-argument-editing-function"),
-		  decoded_program);
+    {
+      struct gcpro gcpro1, gcpro2;
+
+      GCPRO2(program, decoded_program);
+      func = call1 (intern ("find-process-argument-editing-function"),
+		    decoded_program);
+      UNGCPRO;
+    }
+
     if (NILP (func))
       {
 	arglen = 0;
@@ -880,17 +887,18 @@
       }
     else
       {
-	struct gcpro gcpro1, gcpro2;
+	struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
 	arg = Qnil;
-	GCPRO2 (arg, func);
+	GCPRO4 (arg, func, program, decoded_program);
 	targ = argv;
 	while (*targ)
 	  {
 	    arg = Fcons (build_string (*targ++), arg);
 	  }
 	arg = Fnreverse (arg);
+	result = call1 (func, arg);
 	UNGCPRO;
-	result = call1 (func, arg);
+
 	if (CONSP (result))
 	  {
 	    int size;

-- 
ほりぐちきょうたろう