From: Steven Pemberton <Steven.Pemberton@cwi.nl>
To: dahms@ifk20.mach.uni-karlsruhe.de
Cc: gnu-win32@cygnus.com
Subject: RE: b18: cygwin_except_handler failure on deref NULL
Date: Tue, 16 Sep 1997 03:44:00 -0000 [thread overview]
Message-ID: <UTC199709161043.MAA06363.steven@schoener.cwi.nl> (raw)
In-Reply-To: <009B9C5E.173D3DA0.22545@ifk20.mach.uni-karlsruhe.de>
> Hi Steven, you wrote:
>
> : (ENQUIRE.EXE 1011) In cygwin_except_handler
>
> : It failed at the point where the program looks to see if dereferencing
> : NULL causes a trap (which is done using setjmp, and dereferencing NULL).
>
> I think it worked, because cygwin_except_handler *is* the trap handler!
> Do you have an complete example in a dozen of source lines or so?
My guess is that this would cause the same fault (but I don't have a
PC to hand):
#include <stdio.h>
#include <signal.h>
#include <setjmp.h>
jmp_buf mlab; int v, *p;
void address(sig) int sig; { /* what to do on an address error */
signal(sig, address);
longjmp(mlab, 1);
}
main() {
#ifdef SIGBUS
signal(SIGBUS, address);
#endif
#ifdef SIGSEGV
signal(SIGSEGV, address);
#endif
if (setjmp(mlab) == 0) {
p= 0;
v= *p;
printf("Dereferencing NULL doesn't cause a trap\n");
} else {
printf("Dereferencing NULL causes a trap\n");
}
}
Best wishes,
Steven Pemberton
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
next prev parent reply other threads:[~1997-09-16 3:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-09-03 16:43 dahms
1997-09-16 3:44 ` Steven Pemberton [this message]
-- strict thread matches above, loose matches on Subject: below --
1997-08-26 2:52 Steven Pemberton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=UTC199709161043.MAA06363.steven@schoener.cwi.nl \
--to=steven.pemberton@cwi.nl \
--cc=dahms@ifk20.mach.uni-karlsruhe.de \
--cc=gnu-win32@cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).