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

Owner: Nobody
Requestors: masak <cmasak [at] gmail.com>
Cc:
AdminCc:

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



Subject: [BUG] Segmentation fault for some code in Rakudo
Date: Mon, 15 Oct 2012 13:18:44 +0200
To: rakudobug [...] perl.org
From: Carl Mäsak <cmasak [...] gmail.com>
Download (untitled) / with headers
text/plain 341b
<flussence> oh btw, I found this while you were away :) <flussence> echo -e 'my \\a = any set <1 2 3>; \n say 1 ~~ a' | perl6 <moritz> Segmentation fault (core dumped) <flussence> works fine if you omit the \n, though. <masak> has it been RT'd? <flussence> I've been too busy trying to break rakudo to file bugs :P * masak submits rakudobug
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 988b
On Mon Oct 15 04:19:04 2012, masak wrote: Show quoted text
> <flussence> oh btw, I found this while you were away :) > <flussence> echo -e 'my \\a = any set <1 2 3>; \n say 1 ~~ a' | perl6 > <moritz> Segmentation fault (core dumped) > <flussence> works fine if you omit the \n, though. > <masak> has it been RT'd? > <flussence> I've been too busy trying to break rakudo to file bugs :P > * masak submits rakudobug
Alternatively, it also explodes on the JVM: $ echo -e 'my \\a = any set <1 2 3>; \n say 1 ~~ a' | ./perl6 Show quoted text
> my \a = any set <1 2 3>;
any(3, 2, 1) Show quoted text
> say 1 ~~ a
scgethandle can only operate on an SCRef java.lang.RuntimeException: java.lang.Exception: Cannot understand '- QAST::CompUnit' java.lang.RuntimeException: java.lang.ClassCastException: __P6opaque__18 cannot be cast to org.perl6.nqp.runtime.EvalResult Cannot stringify this And without the \n : $ echo -e 'my \\a = any set <1 2 3>; say 1 ~~ a' | ./perl6 Show quoted text
> my \a = any set <1 2 3>; say 1 ~~ a
True True -- Will "Coke" Coleda
Download (untitled) / with headers
text/plain 377b
moar seems happy now: $ echo -e 'my \\a = any set <1 2 3>; \n say 1 ~~ a' | ./perl6-m any(set(1, 2, 3)) 0 JVM still broken here, I changed the REPL's ">" to "%" to not treat it as a replied msg: $ echo -e 'my \\a = any set <1 2 3>; \n say 1 ~~ a' | ./perl6-j % my \a = any set <1 2 3>; any(set(3, 1, 2)) % say 1 ~~ a Method 'gist' not found for invocant of class 'BOOTInt'
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 817b
On Tue Apr 14 13:00:36 2015, FROGGS.de wrote: Show quoted text
> moar seems happy now: > > $ echo -e 'my \\a = any set <1 2 3>; \n say 1 ~~ a' | ./perl6-m > any(set(1, 2, 3)) > 0 > > JVM still broken here, I changed the REPL's ">" to "%" to not treat it > as a replied msg: > $ echo -e 'my \\a = any set <1 2 3>; \n say 1 ~~ a' | ./perl6-j > % my \a = any set <1 2 3>; > any(set(3, 1, 2)) > % say 1 ~~ a > Method 'gist' not found for invocant of class 'BOOTInt'
Behavior has changed slightly on JVM - $ echo -e 'my \\a = any set <1 2 3>; \n say 1 ~~ a' | ./perl6-m Show quoted text
> any(set(1, 3, 2)) > False >
$ echo -e 'my \\a = any set <1 2 3>; \n say 1 ~~ a' | ./perl6-j Show quoted text
> any(set(3, 1, 2)) > False
True Show quoted text
>
The ~~ check on the JVM outputs both False & True (as opposed to the moar version, which only outputs False) -- Will "Coke" Coleda
Download (untitled) / with headers
text/plain 1.3k
On Mon Aug 03 13:26:14 2015, coke wrote: Show quoted text
> On Tue Apr 14 13:00:36 2015, FROGGS.de wrote:
> > moar seems happy now: > > > > $ echo -e 'my \\a = any set <1 2 3>; \n say 1 ~~ a' | ./perl6-m > > any(set(1, 2, 3)) > > 0 > > > > JVM still broken here, I changed the REPL's ">" to "%" to not treat > > it > > as a replied msg: > > $ echo -e 'my \\a = any set <1 2 3>; \n say 1 ~~ a' | ./perl6-j > > % my \a = any set <1 2 3>; > > any(set(3, 1, 2)) > > % say 1 ~~ a > > Method 'gist' not found for invocant of class 'BOOTInt'
> > Behavior has changed slightly on JVM - > > $ echo -e 'my \\a = any set <1 2 3>; \n say 1 ~~ a' | ./perl6-m
> > any(set(1, 3, 2)) > > False > >
> > $ echo -e 'my \\a = any set <1 2 3>; \n say 1 ~~ a' | ./perl6-j
> > any(set(3, 1, 2)) > > False
> True
> >
> > The ~~ check on the JVM outputs both False & True (as opposed to the > moar version, which only outputs False)
The actual problem here seems to be that the REPL on R-J somehow deems it necessary to output the return value of a outputting sub that takes a Junction somewhere in it's argument list: $ ./perl6-j To exit type 'exit' or '^D' Show quoted text
> say 1 ~~ any set <1 2 3>
False True Show quoted text
> say any set < 1 2 3 >
any(set(2, 3, 1)) True Show quoted text
> say any 1
any(1) Show quoted text
> print any 1
any(1)True Show quoted text
> note any 1
any(1) True Show quoted text
> note any False
any(False) True Show quoted text
> say 1, any 1
1any(1) True Show quoted text
>


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