<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Letting any code run after a SIGSEGV is dubious.<BR>
Imagine the heap is corrupted.<BR>
And then you run more code.<BR>
And the code happens to call malloc.<BR>
Or printf to log something.<BR>
 <BR>
I suppose there might be an application that maps memory<BR>
gradually, as pieces of a buffer are hit. Might.<BR>
 <BR>
 - Jay<BR> <BR>
> To: m3devel@elegosoft.com<BR>> Date: Sat, 19 Feb 2011 10:29:30 -0800<BR>> From: mika@async.caltech.edu<BR>> Subject: [M3devel] SEGV mapping to RuntimeError<BR>> <BR>> <BR>> Dear m3devel,<BR>> <BR>> For a while it has annoyed me that segmentation violations cause an<BR>> unconditional program abort. I've changed that now so that (under user<BR>> threads at least) we instead get a RuntimeError. Here's an example of<BR>> the mechanism at work in an interactive Scheme environment. Consider<BR>> the unhelpful interface and module Crash:<BR>> <BR>> INTERFACE Crash; PROCEDURE Me(); END Crash.<BR>> <BR>> MODULE Crash;<BR>> <BR>> PROCEDURE Me() =<BR>> VAR ptr : REF INTEGER := NIL; BEGIN<BR>> ptr^ := 0<BR>> END Me;<BR>> <BR>> BEGIN END Crash.<BR>> <BR>> Here's an example of what happens if you now call this from an interactive<BR>> interpreter that catches the exception RuntimeError.E:<BR>> <BR>> M-Scheme Experimental<BR>> LITHP ITH LITHENING.<BR>> > (require-modules "m3")<BR>> #t<BR>> > (Crash.Me)<BR>> EXCEPTION! RuntimeError! Attempt to reference an illegal memory location.<BR>> > (+ 3 4) <BR>> 7<BR>> > <BR>> <BR>> I just realized I may have broken pthreads, let me go back and double-check it. <BR>> runtime/POSIX and thread/POSIX don't refer to the same thing do they...<BR>> <BR>> Mika<BR>> <BR>                                           </body>
</html>