Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Oct 1999 11:23:37 -0500 (CDT)
From:      Alec Kloss <ajk@paw-in-eye.net>
To:        gupz@hotmail.com (Dodge Ram)
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Handling segV's
Message-ID:  <199910151623.LAA25438@D2SI.COM>
In-Reply-To: <19991015153003.54337.qmail@hotmail.com> from Dodge Ram at "Oct 15, 1999  8:30: 3 am"

next in thread | previous in thread | raw e-mail | index | archive | help
Dodge Ram said:

> Hi,
> 
> 	I am looking at ways to handle segV's gracefully without
> letting a process die. I am aware of the siglongjmp() call and don't
> know if that is the only way to handle segV's
> 
> 	Any pointers on how to gracefully (?) handle segV and not
> letting the process die will be of great help.
> 
> 	Also, given that I have a solution to test, what are all the
> ways I can ensure that my process handles segV's rightly ?
> 
> thanks and regards,
> 
> ramC
> 

Attempting to recover from a SIGSEGV seems like a very risky proposition.
Essentially, ANY writeable memory by the process may have been
clobbered before the process decided to write to read-only memory
generating the SIGSEGV.  Suppose you recover and longjump somewhere
and then flush your IO buffers out to disk.  For all you know, the
buffers are now total garbage, so now you have a running program
working with incorrect data on disk.  

Yikes.



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199910151623.LAA25438>