Making Errors errors

H. S. Teoh hsteoh at quickfur.ath.cx
Thu Jan 28 23:55:35 UTC 2021


On Thu, Jan 28, 2021 at 11:41:44PM +0000, sighoya via Digitalmars-d wrote:
> On Thursday, 28 January 2021 at 19:42:54 UTC, Paul Backus wrote:
> > From now on, whenever this topic comes up, I'm just going to post
> > this link:
> > 
> > http://joeduffyblog.com/2016/02/07/the-error-model/#bugs-arent-recoverable-errors
[...]
> Given range indexing as an example, we would certainly think of index
> violations as bugs. That may be true. However, the code following
> after the random access wouldn't be executed anyway and the caller may
> or may not depend hard on the result of the code fragment.
[...]

Actually, in the absence of a range check (in C, or D with -release),
code following the access *will* be executed, with undefined behaviour.
Also known by the more familiar name "buffer overflow exploit".


T

-- 
Why did the mathematician reinvent the square wheel?  Because he wanted to drive smoothly over an inverted catenary road.


More information about the Digitalmars-d mailing list