Making alloca more safe

Walter Bright newshound1 at digitalmars.com
Thu Nov 19 18:03:54 PST 2009


BCS wrote:
> For some systems, once you hit a seg-v, things can't get any worse

Oh, yes they can! You could now be executing a virus. *Anything* the 
software is connected to can now do anything wrong or malicious.

(On my car, I installed an oil pressure switch that shuts off the 
electric fuel pump if the pressure drops. I also pried a switch off of a 
junkyard Mustang that shuts off if it gets hit hard, I also plan on 
installing that to shut off the fuel pump. Think of those like a "seg 
fault" <g>)

> so why not try to make things better by saving what you can?

Sure, you can try saving things, but you'd better hope that there was 
already a reasonably recent clean copy of your data.

To write safe & reliable software, approach it from "what can go wrong, 
will go wrong", not "I won't worry about that case, because it's unlikely."



More information about the Digitalmars-d mailing list