Exception/Error division in D

Regan Heath regan at netmail.co.nz
Thu May 31 02:18:42 PDT 2012


On Wed, 30 May 2012 22:36:50 +0100, Jonathan M Davis <jmdavisProg at gmx.com>  
wrote:
> In general, a segfault is definitely worse, but logic errors can_ be  
> just as bad in terms of the damage that they can do (especially in  
> cmparison with
> segfaults caused by null pointers as opposed to those caused by memory
> corruption). It all depends on what the logic error is and what happens  
> if you try and continue with the program in such a state.

In fact.. a logic error - or rather an assert triggered by a bad argument  
or similar may be the result of memory corruption which was undetected  
i.e. buffer overflow on the stack overwriting an integer passed to a  
function which asserts it is within a range, and it isn't.  So, you can't  
even be sure that logic errors aren't caused by memory corruption.

R

-- 
Using Opera's revolutionary email client: http://www.opera.com/mail/


More information about the Digitalmars-d mailing list