I see an off-by-1 error in that code. If set_size is equal to 15, then
set_size/8 will be 1, which can only fit 8 bytes.

It should be new set_size/8+1 on both the like with new and the subsequent
memset() one.

Making this change fixes the problem.

Regards,
Elias



On 13 October 2015 at 18:11, Jay Foad <jay.f...@gmail.com> wrote:

> But 104?104 is fine! It's broken when the argument is not a multiple
> of 8. This code (in Bif_F12_ROLL::eval_AB in ScalarFunction.cc) should
> round up to a multiple of 8, not down.
>
>    // set_size can be rather big, so we new/delete it
>    //
> uint8_t * used = new uint8_t[set_size/8];
>    memset(used, 0, set_size/8);
>
> Jay.
>
> On 13 October 2015 at 00:48, Louis de Forcrand <ol...@bluewin.ch> wrote:
> > Hello again,
> >
> > If I enter 100?100 GNU-APL inexplicably hangs up.
> > I tried moving up from 90?90 and found that it
> > "breaks" at around 90?90, although this is not
> > consistent.
> >
> > ^C does nothing.
> >
> > Again, I'm on 64-bit Mac OS X 10.10.5, 2009 MacBook Pro.
> >
> > ⊣Louis
>
>

Reply via email to