[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Crash with recursive make
From: |
John Hall |
Subject: |
RE: Crash with recursive make |
Date: |
Fri, 6 Oct 2006 11:11:24 +0100 |
On 05 October 2006 20:55, Eli Zaretskii <address@hidden> wrote:
> > 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:
> > /* 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.
Eli,
Investigating further, make is crashing in windows32_openpipe while
evaluating the expression:
VERSION_STRING = $(shell cat $(VERSION_TXT))
where cat is a Windows native version of cat from unxutils
(http://unxutils.sourceforge.net/).
The call to CreatePipe succeeds, but the second call to _open_osfhandle
fails, with EBADF and ERROR_INVALID_HANDLE. The code does not currently
check the return code to either of the calls to _open_osfhandle.
I'm not sure why it should fail - perhaps cat closes its stdin or has
already exited - but given this is possible perhaps my fix is the
correct one.
Regards,
John
- Crash with recursive make, John Hall, 2006/10/05
- RE: Crash with recursive make, John Hall, 2006/10/06
- RE: Crash with recursive make,
John Hall <=
- RE: Crash with recursive make, John Hall, 2006/10/07
- RE: Crash with recursive make, John Hall, 2006/10/09
- RE: Crash with recursive make, John Hall, 2006/10/10
- RE: Crash with recursive make, John Hall, 2006/10/10
- RE: Crash with recursive make, John Hall, 2006/10/11