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

Owner: Nobody
Requestors: bartolin [at] gmx.de
Cc:
AdminCc:

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



To: rakudobug [...] perl.org
Date: Sat, 14 Jan 2017 11:23:45 +0100
From: Christian Bartolomaeus <bartolin [...] gmx.de>
Subject: [JVM] Method combinations broken after commit bcc113cfb0
Download (untitled) / with headers
text/plain 1.3k
With Rakudo commit bcc113cfb0 (Migrate combinations(n,k) logic to Iterator.Combinations) I get some aborted tests for combinations during spectest (running rakudo-j). I think it comes down to this failure: $ ./perl6-j -e '(2).combinations(0)' java.lang.RuntimeException: No such attribute '$!reified' for this object in method pull-one at gen/jvm/CORE.setting line 2931 in method sink-all at gen/jvm/CORE.setting line 2821 in method sink at gen/jvm/CORE.setting line 17172 in block <unit> at -e line 1 This works as expected, so the (0) case seems to be the culprint: $ ./perl6-j -e 'say (1, 2, 3).combinations(1..3).list.perl' ((1,), (2,), (3,), (1, 2), (1, 3), (2, 3), (1, 2, 3)) The full backtrace looks like this: $ ./perl6-j --ll-exception -e '(2).combinations' java.lang.RuntimeException: No such attribute '$!reified' for this object in pull-one (gen/jvm/CORE.setting:2931) in pull-one (gen/jvm/CORE.setting:2964) in sink-all (gen/jvm/CORE.setting:2821) in sink (gen/jvm/CORE.setting:17172) in <unit> (-e:1) in <unit-outer> (-e:1) in eval (gen/jvm/stage2/NQPHLL.nqp:1165) in (gen/jvm/stage2/NQPHLL.nqp:1255) in command_eval (gen/jvm/stage2/NQPHLL.nqp:1252) in command_eval (src/Perl6/Compiler.nqp:27) in command_line (gen/jvm/stage2/NQPHLL.nqp:1236) in MAIN (gen/jvm/main.nqp:47) in <mainline> (gen/jvm/main.nqp:38) in (gen/jvm/main.nqp)
From: Elizabeth Mattijsen <liz [...] dijkmat.nl>
Date: Sat, 14 Jan 2017 12:05:37 +0100
To: "Christian Bartolomaeus (via RT)" <perl6-bugs-followup [...] perl.org>
Subject: Re: [perl #130556] [JVM] Method combinations broken after commit bcc113cfb0
Download (untitled) / with headers
text/plain 1.8k
Hopefully fixed in 00c3551c86 . Cannot check because building JVM backend fails on MacOS. Show quoted text
> On 14 Jan 2017, at 11:24, Christian Bartolomaeus (via RT) <perl6-bugs-followup@perl.org> wrote: > > # New Ticket Created by Christian Bartolomaeus > # Please include the string: [perl #130556] > # in the subject line of all future correspondence about this issue. > # <URL: https://rt.perl.org/Ticket/Display.html?id=130556 > > > > With Rakudo commit bcc113cfb0 (Migrate combinations(n,k) logic to > Iterator.Combinations) I get some aborted tests for combinations > during spectest (running rakudo-j). > > I think it comes down to this failure: > > $ ./perl6-j -e '(2).combinations(0)' > java.lang.RuntimeException: No such attribute '$!reified' for this object > in method pull-one at gen/jvm/CORE.setting line 2931 > in method sink-all at gen/jvm/CORE.setting line 2821 > in method sink at gen/jvm/CORE.setting line 17172 > in block <unit> at -e line 1 > > This works as expected, so the (0) case seems to be the culprint: > > $ ./perl6-j -e 'say (1, 2, 3).combinations(1..3).list.perl' > ((1,), (2,), (3,), (1, 2), (1, 3), (2, 3), (1, 2, 3)) > > The full backtrace looks like this: > > $ ./perl6-j --ll-exception -e '(2).combinations' > java.lang.RuntimeException: No such attribute '$!reified' for this object > in pull-one (gen/jvm/CORE.setting:2931) > in pull-one (gen/jvm/CORE.setting:2964) > in sink-all (gen/jvm/CORE.setting:2821) > in sink (gen/jvm/CORE.setting:17172) > in <unit> (-e:1) > in <unit-outer> (-e:1) > in eval (gen/jvm/stage2/NQPHLL.nqp:1165) > in (gen/jvm/stage2/NQPHLL.nqp:1255) > in command_eval (gen/jvm/stage2/NQPHLL.nqp:1252) > in command_eval (src/Perl6/Compiler.nqp:27) > in command_line (gen/jvm/stage2/NQPHLL.nqp:1236) > in MAIN (gen/jvm/main.nqp:47) > in <mainline> (gen/jvm/main.nqp:38) > in (gen/jvm/main.nqp)
Subject: Re: [perl #130556] [JVM] Method combinations broken after commit bcc113cfb0
To: perl6-compiler [...] perl.org
Date: Sat, 14 Jan 2017 12:05:03 +0100
From: Elizabeth Mattijsen <liz [...] dijkmat.nl>
Download (untitled) / with headers
text/plain 1.8k
Hopefully fixed in 00c3551c86 . Cannot check because building JVM backend fails on MacOS. Show quoted text
> On 14 Jan 2017, at 11:24, Christian Bartolomaeus (via RT) <perl6-bugs-followup@perl.org> wrote: > > # New Ticket Created by Christian Bartolomaeus > # Please include the string: [perl #130556] > # in the subject line of all future correspondence about this issue. > # <URL: https://rt.perl.org/Ticket/Display.html?id=130556 > > > > With Rakudo commit bcc113cfb0 (Migrate combinations(n,k) logic to > Iterator.Combinations) I get some aborted tests for combinations > during spectest (running rakudo-j). > > I think it comes down to this failure: > > $ ./perl6-j -e '(2).combinations(0)' > java.lang.RuntimeException: No such attribute '$!reified' for this object > in method pull-one at gen/jvm/CORE.setting line 2931 > in method sink-all at gen/jvm/CORE.setting line 2821 > in method sink at gen/jvm/CORE.setting line 17172 > in block <unit> at -e line 1 > > This works as expected, so the (0) case seems to be the culprint: > > $ ./perl6-j -e 'say (1, 2, 3).combinations(1..3).list.perl' > ((1,), (2,), (3,), (1, 2), (1, 3), (2, 3), (1, 2, 3)) > > The full backtrace looks like this: > > $ ./perl6-j --ll-exception -e '(2).combinations' > java.lang.RuntimeException: No such attribute '$!reified' for this object > in pull-one (gen/jvm/CORE.setting:2931) > in pull-one (gen/jvm/CORE.setting:2964) > in sink-all (gen/jvm/CORE.setting:2821) > in sink (gen/jvm/CORE.setting:17172) > in <unit> (-e:1) > in <unit-outer> (-e:1) > in eval (gen/jvm/stage2/NQPHLL.nqp:1165) > in (gen/jvm/stage2/NQPHLL.nqp:1255) > in command_eval (gen/jvm/stage2/NQPHLL.nqp:1252) > in command_eval (src/Perl6/Compiler.nqp:27) > in command_line (gen/jvm/stage2/NQPHLL.nqp:1236) > in MAIN (gen/jvm/main.nqp:47) > in <mainline> (gen/jvm/main.nqp:38) > in (gen/jvm/main.nqp)
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 3.2k
On Sat, 14 Jan 2017 03:06:52 -0800, elizabeth wrote: Show quoted text
> Hopefully fixed in 00c3551c86 . Cannot check because building JVM > backend fails on MacOS.
As discussed on #perl6-dev [1] this didn't fix the issue, unfortunately. I think, I've found the underlying reason for the breakage. This is a golf of the error (the following evaluations are run on commit 502fc77a68): $ ./perl6-j --version This is Rakudo version 2016.12-320-g502fc77 built on JVM implementing Perl 6.c. $ ./perl6-j -e 'say Rakudo::Internals.ListsFromSeq( (2,3), combinations(2,0))' java.lang.RuntimeException: No such attribute '$!reified' for this object in method pull-one at gen/jvm/CORE.setting line 2931 in method push-exactly at gen/jvm/CORE.setting line 2734 in method push-at-least at gen/jvm/CORE.setting line 2753 in method reify-at-least at gen/jvm/CORE.setting line 18753 in method pull-one at gen/jvm/CORE.setting line 19246 in method pull-one at gen/jvm/CORE.setting line 6730 in method join at gen/jvm/CORE.setting line 17261 in method gist at gen/jvm/CORE.setting line 19448 in method gist at gen/jvm/CORE.setting line 17240 in sub say at gen/jvm/CORE.setting line 36238 in block <unit> at -e line 1 Now 'combinations(2,0)' is nothing else than 'Seq.new(Rakudo::Iterator.Combinations(2,0,0))' At first glance the following looks ok: $ ./perl6-j -e 'dd combinations(2,0)' # same output as on perl6-m ((),).Seq But this looks wrong: $ ./perl6-j -e 'dd combinations(2,0)[0..1]' ((), Mu) Compare to perl6-m: $ ./perl6-m -e 'dd combinations(2,0)[0..1]' ((), Nil) And calling 'Seq.new(Rakudo::Iterator.Combinations(2,0,0))' reveals the problem: $ ./perl6-j -e 'say Seq.new(Rakudo::Iterator.Combinations(2,0,0))' (() (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) ...) Under the hood Rakudo::Iterator.OneValue is called like so: $ ./perl6-j -e 'say Seq.new(Rakudo::Iterator.OneValue(List.new))' (() (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) ...) And within Rakudo::Iterator.OneValue we execute something like this (same bug as in https://rt.perl.org/Ticket/Display.html?id=130532): $ ./perl6-j -e 'use nqp; class A { has Mu $!foo; method bar () { $!foo := nqp::null; say nqp::isnull($!foo) ?? "null" !! $!foo } }.new.bar' (Mu) So, as far as I understand Rakudo::Iterator.OneValue does not work correctly on rakudo-j, and that surfaces at different points due to lizmat's refactoring. [1] https://irclog.perlgeek.de/perl6-dev/2017-01-14#i_13920333


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