Skip Menu |
Report information
Id: 130285
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: alex.jakimenko [at] gmail.com
Cc:
AdminCc:

Severity: (no value)
Tag: testneeded
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: [REGRESSION] Unhealthy overflow in .head and .tail with huge negative numbers ( (4,5,6).tail(-9999999999999999999) )
Download (untitled) / with headers
text/plain 461b
Code: say (4,5,6).tail(-9999999999999999999) Result HEAD: MoarVM panic: Memory allocation failed; could not allocate 12233720368547758088 bytes Result (2016.09): () Code: say (4,5,6).head(-9999999999999999999) Result HEAD: (4 5 6) Result (2016.09): () Bisectable points to these commits: * https://github.com/rakudo/rakudo/commit/a3406cba841cd9ecdd3bda49b9a415381615961c * https://github.com/rakudo/rakudo/commit/6996512e3c994fafa2d34e8c5c9bf9d25f0a0810
Fixed with 93b0ffae5292791bf14b0d
Subject: Re: [perl #130285] [REGRESSION] Unhealthy overflow in .head and .tail with huge negative numbers ( (4,5,6).tail(-9999999999999999999) )
To: "Aleks-Daniel Jakimenko-Aleksejev (via RT)" <perl6-bugs-followup [...] perl.org>
Date: Sat, 22 Jul 2017 21:44:30 +0200
From: Elizabeth Mattijsen <liz [...] dijkmat.nl>
Download (untitled) / with headers
text/plain 1.1k
I’m inclined to WONTFIX, as other, much more common, indexing operation suffer from the same issue: $ 6 'my @a; say @a[9999999999999999999]' Cannot unbox 64 bit wide bigint into native integer $ 6 'my @a[9999999999999999999]' Illegal dimension in shape: 9999999999999999999. All dimensions must be integers bigger than 0 etc etc etc. Show quoted text
> On 7 Dec 2016, at 01:37, Aleks-Daniel Jakimenko-Aleksejev (via RT) <perl6-bugs-followup@perl.org> wrote: > > # New Ticket Created by Aleks-Daniel Jakimenko-Aleksejev > # Please include the string: [perl #130285] > # in the subject line of all future correspondence about this issue. > # <URL: https://rt.perl.org/Ticket/Display.html?id=130285 > > > > Code: > say (4,5,6).tail(-9999999999999999999) > > Result HEAD: > MoarVM panic: Memory allocation failed; could not allocate 12233720368547758088 bytes > > Result (2016.09): > () > > > Code: > say (4,5,6).head(-9999999999999999999) > > Result HEAD: > (4 5 6) > > Result (2016.09): > () > > > Bisectable points to these commits: > * https://github.com/rakudo/rakudo/commit/a3406cba841cd9ecdd3bda49b9a415381615961c > * https://github.com/rakudo/rakudo/commit/6996512e3c994fafa2d34e8c5c9bf9d25f0a0810

I'm not sure if this is closable. The regression is no longer there, so I'll remove the tag, but here's a problem:

Code:
say (4,5,6).tail(-2**63+4)

Result:
()


Code:
say (4,5,6,7).tail(-2**63+4)

Result:
Cannot unbox 64 bit wide bigint into native integer
  in block <unit> at -e line 1


It feels like something is wrong? I am not sure.


On 2017-07-22 12:44:53, elizabeth wrote:
> I’m inclined to WONTFIX, as other, much more common, indexing
> operation suffer from the same issue:
>
> $ 6 'my @a; say @a[9999999999999999999]'
> Cannot unbox 64 bit wide bigint into native integer
>
> $ 6 'my @a[9999999999999999999]'
> Illegal dimension in shape: 9999999999999999999. All dimensions must
> be integers bigger than 0
>
> etc etc etc.
>
> > On 7 Dec 2016, at 01:37, Aleks-Daniel Jakimenko-Aleksejev (via RT)
> > <perl6-bugs-followup@perl.org> wrote:
> >
> > # New Ticket Created by Aleks-Daniel Jakimenko-Aleksejev
> > # Please include the string: [perl #130285]
> > # in the subject line of all future correspondence about this issue.
> > # <URL: https://rt.perl.org/Ticket/Display.html?id=130285 >
> >
> >
> > Code:
> > say (4,5,6).tail(-9999999999999999999)
> >
> > Result HEAD:
> > MoarVM panic: Memory allocation failed; could not allocate
> > 12233720368547758088 bytes
> >
> > Result (2016.09):
> > ()
> >
> >
> > Code:
> > say (4,5,6).head(-9999999999999999999)
> >
> > Result HEAD:
> > (4 5 6)
> >
> > Result (2016.09):
> > ()
> >
> >
> > Bisectable points to these commits:
> > *
> > https://github.com/rakudo/rakudo/commit/a3406cba841cd9ecdd3bda49b9a415381615961c
> > *
> > https://github.com/rakudo/rakudo/commit/6996512e3c994fafa2d34e8c5c9bf9d25f0a0810


 



This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org