Bad array indexing is considered deadly
Nick Sabalausky (Abscissa) via Digitalmars-d
digitalmars-d at puremagic.com
Wed May 31 13:23:21 PDT 2017
On 05/31/2017 03:17 PM, Moritz Maxeiner wrote:
> in general you have to
> assume that the index *being* out of bounds is itself the *result* of
> *already occurred* data corruption;
Of course not, that's absurd. Where do people get the idea that
out-of-bounds *implies* pre-existing data corruption? Most of the time,
out-of-bounds comes from a bug (especially in D, what with all of its
safeguards).
Sure, data corruption is one possible cause of out-of-bounds, but data
corruption is one possible cause of *ANYTHING*. So just to be safe,
let's just abort on all exceptions, and upon everything else for that
matter.
More information about the Digitalmars-d
mailing list