dereferencing null
Walter Bright
newshound2 at digitalmars.com
Tue Mar 6 18:29:03 PST 2012
On 3/6/2012 5:29 PM, Chad J wrote:
> But what do you say to the notion of isolation? someFunc is isolated from
> riskyShenanigans becuase it /knows/ what state is touched by riskyShenanigans.
> If riskyShenanigans does something strange and unexpected, and yes, it does have
> a bug in it, then I feel that someFunc should be able to reset the state touched
> by riskyShenanigans and continue.
That's the theory. But in practice, when you get a seg fault, there's (at
minimum) a logical error in your program, and it is in an undefined state. Since
memory is all shared, you have no idea whether that error is isolated or not,
and you *cannot* know, because there's a logic error you didn't know about.
Continuing on after the program has entered an unknown an undefined state is
just a recipe for disaster.
More information about the Digitalmars-d
mailing list