Seg Fault

Alastair Reid alastair@reid-consulting-uk.ltd.uk
28 Aug 2002 19:24:48 +0100


> Gdb lets you catch signals even if the application has installed
> handlers for them: see 'help handle' in gdb. 

It was Conal Elliott who asked me to add the flag (hmmmm, must have
been about 5 years ago now) - he was probably using Visual Studio.

Checking the sources, I also noticed that we turn on DONT_PANIC when
configured with pthreads turned on.  I've no idea why we do this but
imagine there's a good reason :-)

> I'd just keep DONT_PANIC turned off - but something should probably
> be done to detect an infinite loop if Hugs immediately seg faults
> again (maybe it is, I haven't checked the code).

I don't think there is a second check.  I think we get away with it
because Hugs tends to segfault only during execution of Haskell code
(stack overflow or calling a foreign library using the ffi) which
tends to leave the interpreter in an ok state.


-- 
Alastair Reid                 alastair@reid-consulting-uk.ltd.uk  
Reid Consulting (UK) Limited  http://www.reid-consulting-uk.ltd.uk/alastair/