This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Minimal test case for Make crash bug
Dan Kegel wrote:
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 ...
OK, I built a debugging version of cygwin1.dll and dropped it
on top of the normal one, then ran my test program with
export CYGWIN=error_start:C:\\cygwin\\bin\\gdb.exe
./foo
and hit 'c' and then 'bt' as suggested. Looks like the
debugger is a bit happier with the debugging build.
I don't have time to look at it tonight, but in case
it makes any sense to you, here's the backtrace.
Thanks,
Dan
Program received signal SIGSEGV, Segmentation fault.
[Switching to thread 660.0x838]
fhandler_base::fhandler_base() (this=0x0)
at
../../../../cygwin-snapshot-20040318-1/winsup/cygwin/fhandler.cc:1275
1275 {
Current language: auto; currently c++
(gdb) bt
#0 fhandler_base::fhandler_base() (this=0x0)
at
../../../../cygwin-snapshot-20040318-1/winsup/cygwin/fhandler.cc:1275
#1 0x61031854 in fhandler_disk_file::fhandler_disk_file() (this=0x0)
at
../../../../cygwin-snapshot-20040318-1/winsup/cygwin/fhandler_disk_file.cc:379
#2 0x6101e174 in build_fh_pc(path_conv&) (pc=@0x22ec90)
at ../../../../cygwin-snapshot-20040318-1/winsup/cygwin/fhandler.h:311
#3 0x6101ded8 in build_fh_name(char const*, void*, unsigned,
suffix_info*) (
name=0x401050 "foo.c", h=0x0, opt=1, si=0x0)
at ../../../../cygwin-snapshot-20040318-1/winsup/cygwin/dtable.cc:351
#4 0x61095071 in open (unix_path=0x401050 "foo.c", flags=0)
at ../../../../cygwin-snapshot-20040318-1/winsup/cygwin/syscalls.cc:550
#5 0x610883cf in _sigfe ()
at ../../../../cygwin-snapshot-20040318-1/winsup/cygwin/cygserver.h:82
#6 0x00000085 in ?? ()
#7 0xffffffff in ?? ()
#8 0x0022f070 in ?? ()
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/