Minimal test case for Make crash bug

Dan Kegel
Sun Mar 21 14:18:00 GMT 2004

Dan Kegel wrote:
> Got it.  I'm attaching a minimal test case.  glibc's makefile
> requires that Make be able to handle 140 levels of include recursion,
> but cygwin Make crashes after about 130 -- unless you're running
> under gdb or strace, in which case it works fine.

Turns out the smallest test case is even smaller:

#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>

int main(int argc, char **argv)
         int i;
         for (i=0; ; i++) {
                 int fd = open("foo.c", O_RDONLY);
                 printf("fd #%d is %d\n", i, fd);

This crashes for me at the 133rd fd unless I run it under
gdb, in which case it runs quite happily forever without
crashing (though it runs out of fds fairly soon).
And this is a WinXP system with an up-to-date cygwin and
scads of memory, not some Win95 box with 16MB...

It's all a bit mysterious.  Where's a good place to
look for clues?  I've already tried shutting down as many
systray programs as I can...
- Dan

Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list