make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crash with recursive make


From: Eli Zaretskii
Subject: Re: Crash with recursive make
Date: Thu, 05 Oct 2006 21:54:59 +0200

> Date: Thu, 5 Oct 2006 13:47:01 +0100
> From: "John Hall" <address@hidden>
> 
> When doing a recursive make, the child process immediately crashed. When
> running under the debugger I saw a CRT assertion. In func_shell in
> function.c it was attempting to close the write side of a pipe, but the
> file handle was actually -1. I've just done: 
> 
> diff -u -r1.1 -r1.3
> --- function.c  5 Oct 2006 12:21:54 -0000       1.1
> +++ function.c  5 Oct 2006 12:32:13 -0000       1.3
> @@ -1685,7 +1685,8 @@
>        free ((char *) command_argv);
> 
>        /* Close the write side of the pipe.  */
> -      (void) close (pipedes[1]);
> +      if (pipedes[1] >= 0)
> +        (void) close (pipedes[1]);
>  #endif
> 
>        /* Set up and read from the pipe.  */
> 
> 
> This fixes it for me, but is not necessarily getting to the root of the
> problem.

Thanks for the report and a patch, but could you perhaps run Make
under a debugger, put a data breakpoint on pipes[1], and see where
does it get the -1 value and why?  That should help identify the root
of the problem, I think.

TIA




reply via email to

[Prev in Thread] Current Thread [Next in Thread]