This is the mail archive of the
cygwin@sources.redhat.com
mailing list for the Cygwin project.
Exit code zero in case of STATUS_ACCESS_VIOLATION - AC_TRY_RUN confused
- To: <Cygwin at Sourceware dot Cygnus dot Com>
- Subject: Exit code zero in case of STATUS_ACCESS_VIOLATION - AC_TRY_RUN confused
- From: "Andrej Borsenkow" <Andrej dot Borsenkow at mow dot siemens dot ru>
- Date: Wed, 26 Jul 2000 11:13:10 +0400
> > This particular problem was due to tgetent() problem. Zsh tests, if
> > tgetent() accepts null pointer for buffer. Unfortunately,
> test always
> > succeeded, but running under gdb showed, that Zsh crashed in
> > tgetent(0,"cygwin").
> >
Test succeeded because you get exit status 0 in case of program crash
(and AC_TRY_RUN believed everything O.K.):
mw1g017@MW1G17C ~/src/temcap
$ cat main.c
main()
{
int i = tgetent((char*)0,"vt100");
if (i > 0) {
char tbuf[1024], *u;
u = tbuf;
tgetstr("cl", &u);
}
exit(!i || i == -1);
}
mw1g017@MW1G17C ~/src/temcap
$ gcc -o main main.c -ltermcap
mw1g017@MW1G17C ~/src/temcap
$ ./main
0 [main] main 1010 handle_exceptions: Exception:
STATUS_ACCESS_VIOLATION
3317 [main] main 1010 stackdump: Dumping stack trace to
main.exe.stackdump
mw1g017@MW1G17C ~/src/temcap
$ echo $?
0
Is it expected? The above is exact test as used in Zsh. (ncurses
obviously has more friendly tgetent() :-)
-andrej
P.S. I'd appreciate Cc as I am not on this list.
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com