SIGSEGV handler Question
- From: "LaBird" <bowlcheung@xxxxxxxxx>
- Date: Thu, 31 Aug 2006 00:09:26 +0800
Hi,
I know that if a user-level signal handler is implemented to capture
SIGSEGV, the fault must be corrected by the signal handler before the
handler exits, so as to avoid infinite looping. Usually this is done by
changing the memory protection mode or perform a memory mapping on the
virtual address that causes the fault.
I'd like to ask if it is possible to write a signal handler to capture
SIGSEGV, and handles the fault by changing the virtual address the program
is accessing instead? For example, if a read to VM address 0x12340000 causes
a SIGSEGV, instead of changing the memory protection of 0x12340000 to
readable or perform a memory mapping on this address inside the signal
handler, is it possible to change the VM address to be accessed to, say
0x56780000 inside the handler (assume 0x56780000 is mapped and is readable)?
Thanks very much in advance!
Best Regards,
LaBird (Benny)
[Remove the 2nd, 8th and 9th character to get the actual email address.]
.
- Follow-Ups:
- Re: SIGSEGV handler Question
- From: gil_hamilton@xxxxxxxxxxx
- Re: SIGSEGV handler Question
- From: John Reiser
- Re: SIGSEGV handler Question
- Prev by Date: SMTP library??
- Next by Date: Re: SMTP library??
- Previous by thread: SMTP library??
- Next by thread: Re: SIGSEGV handler Question
- Index(es):
Relevant Pages
|