Program logic bugs vs input/environmental errors

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Tue Oct 7 17:27:59 PDT 2014


On 10/7/2014 2:12 PM, Timon Gehr wrote:
> On 10/07/2014 10:09 PM, Walter Bright wrote:
>> What defined behavior would you suggest would be possible after an
>> overflow bug is detected?
>
> At the language level, there are many possibilities. Just look at what type safe
> languages do. It is not true that this must lead to UB by a "definition"
> commonly agreed upon by participants in this thread.

And even in a safe language, how would you know that a bug in the runtime didn't 
lead to corruption which put your program into the unknown state?

Your assertion rests on some assumptions:

1. the "safe" language doesn't have bugs in its proof or specification
2. the "safe" language doesn't have bugs in its implementation
3. that it is knowable what caused a bug without ever having debugged it
4. that program state couldn't have been corrupted due to hardware failures
5. that it's possible to write a perfect system

all of which are false.


I.e. it is not possible to define the state of a program after it has entered an 
unknown state that was defined to never happen.


More information about the Digitalmars-d mailing list