[m-rev.] for post-commit review: fix autopar feedback aborts

Julien Fischer jfischer at opturion.com
Thu Aug 15 10:48:59 AEST 2019


Hi Zoltan,

On Thu, 15 Aug 2019, Zoltan Somogyi wrote:

> This diff avoids aborts in the feedback/{mandelbrot,mmc} test cases.

The diff looks fine.

> For review by Julien, since it seems that it was his change at Christmas
> to array.fetch_items that broke these tests. Maybe we should reconsider
> testing for out-of-bounds before lo > hi, if it requires workarounds like this.

Doing so would (re)introduce an inconsistency to the interface to
arrays.  Out-of-bounds indexes should *always* lead to an
index_out_of_bounds exception or failure.  (Excepting, of course, the
various unsafe_* predicates where it results in something undefined
by design.)

IMO, code relying on the old behaviour of fetch_items is at best a bit
obscure.  In short I don't think this fix is a workaround, it's what
the calling code should have been doing in the first place.

Julien.


More information about the reviews mailing list