Re: SIGSEGV handler Question
- From: "gil_hamilton@xxxxxxxxxxx" <gil_hamilton@xxxxxxxxxxx>
- Date: 31 Aug 2006 06:55:45 -0700
LaBird wrote:
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)?
It's possible - barely - but it's a really bad idea and would be
fiendishly hard to implement (especially with any significant
generality). What exactly are you trying to accomplish?
GH
.
- Follow-Ups:
- Re: SIGSEGV handler Question
- From: LaBird
- Re: SIGSEGV handler Question
- References:
- SIGSEGV handler Question
- From: LaBird
- SIGSEGV handler Question
- Prev by Date: Re: app developement
- Next by Date: Re: SIGSEGV handler Question
- Previous by thread: Re: SIGSEGV handler Question
- Next by thread: Re: SIGSEGV handler Question
- Index(es):
Relevant Pages
|