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

Owner: Nobody
Requestors: cpan [at] zoffix.com
Cc:
AdminCc:

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



Subject: [BUG] `xx` with large Int repeat count gives bogus results
Download (untitled) / with headers
text/plain 485b
15:53 m: dd (($++ ?? 42 !! |()) xx 9999999999999999999)[^4] 15:53 camelia rakudo-moar 0633f0: OUTPUT: «(Nil, Nil, Nil, Nil)␤» 15:53 IOninja m: dd (($++ ?? 42 !! |()) xx 999)[^4] 15:53 camelia rakudo-moar 0633f0: OUTPUT: «(42, 42, 42, 42)␤» Also, giving huge values that don't yet trigger the above bug causes a hang, perhaps it shouldn't be refying everything? m: dd (($++ ?? 42 !! |()) xx 99999999999999)[^4] camelia │ rakudo-moar 0633f0: OUTPUT: «(timeout)»
Date: Wed, 8 Mar 2017 22:23:21 +0100
Subject: Re: [perl #130956] [BUG] `xx` with large Int repeat count gives bogus results
From: Elizabeth Mattijsen <liz [...] dijkmat.nl>
To: "Zoffix Znet (via RT)" <perl6-bugs-followup [...] perl.org>
Show quoted text
> On 8 Mar 2017, at 16:56, Zoffix Znet (via RT) <perl6-bugs-followup@perl.org> wrote: > > # New Ticket Created by Zoffix Znet > # Please include the string: [perl #130956] > # in the subject line of all future correspondence about this issue. > # <URL: https://rt.perl.org/Ticket/Display.html?id=130956 > > > > > > 15:53 m: dd (($++ ?? 42 !! |()) xx 9999999999999999999)[^4] > 15:53 camelia rakudo-moar 0633f0: OUTPUT: «(Nil, Nil, Nil, Nil)␤» > 15:53 IOninja m: dd (($++ ?? 42 !! |()) xx 999)[^4] > 15:53 camelia rakudo-moar 0633f0: OUTPUT: «(42, 42, 42, 42)␤» > > > Also, giving huge values that don't yet trigger the above bug causes a hang, > perhaps it shouldn't be refying everything? > > m: dd (($++ ?? 42 !! |()) xx 99999999999999)[^4] > camelia │ rakudo-moar 0633f0: OUTPUT: «(timeout)»
Turning xx into a Seq is already on my radar and I already have a patch for it. But first I needed to make sure that HYPER could handle Seq’s as a result of the infix op. That’s been fixed now. Currently look at one other spectest fail.
To: "Zoffix Znet (via RT)" <perl6-bugs-followup [...] perl.org>
Subject: Re: [perl #130956] [BUG] `xx` with large Int repeat count gives bogus results
From: Elizabeth Mattijsen <liz [...] dijkmat.nl>
Date: Fri, 10 Mar 2017 18:26:54 +0100
Download (untitled) / with headers
text/plain 1.4k
The 42 xx 999999999999999 case is fixed with https://github.com/rakudo/rakudo/commit/f190f241e0 . Not having an Empty indicate the end can only be done by breaking at least two spectests. Also: (|(),) xx 42 would then hang. So this feels like something that cannot be fixed generally, unless we accept the hanging behaviour of this example. I also have a patch for the thunked version of xx. But alas, this still breaks a couple of spectests that do: my $a = 0; ($a++,) xx 42; # note the xx Seq is in sink context So for some reason, it looks like the Seq.sink-all is not doing any pull-one’s. Still investigating! Show quoted text
> On 8 Mar 2017, at 16:56, Zoffix Znet (via RT) <perl6-bugs-followup@perl.org> wrote: > > # New Ticket Created by Zoffix Znet > # Please include the string: [perl #130956] > # in the subject line of all future correspondence about this issue. > # <URL: https://rt.perl.org/Ticket/Display.html?id=130956 > > > > > > 15:53 m: dd (($++ ?? 42 !! |()) xx 9999999999999999999)[^4] > 15:53 camelia rakudo-moar 0633f0: OUTPUT: «(Nil, Nil, Nil, Nil)␤» > 15:53 IOninja m: dd (($++ ?? 42 !! |()) xx 999)[^4] > 15:53 camelia rakudo-moar 0633f0: OUTPUT: «(42, 42, 42, 42)␤» > > > Also, giving huge values that don't yet trigger the above bug causes a hang, > perhaps it shouldn't be refying everything? > > m: dd (($++ ?? 42 !! |()) xx 99999999999999)[^4] > camelia │ rakudo-moar 0633f0: OUTPUT: «(timeout)»


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