Skip Menu |
Report information
Id: 122716
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 when digging into the package namespace of a type capture in Rakudo
Date: Sat, 6 Sep 2014 18:34:28 +0200
To: rakudobug [...] perl.org
From: Carl Mäsak <cmasak [...] gmail.com>
<Ven> Oooh, I got a segfault! <Ven> https://gist.github.com/Nami-Doc/f0232a94cec52f0ec14c <- this segfaults here :) Code inlined for great justice: role Zero { constant count = 0; } role Suc[::N] { constant count = 1 + N::count; } subset _0 of Zero; subset _1 of Suc[Zero]; subset _2 of Suc[_1]; # and on and on ... say Suc[Suc[Suc[Zero]]]::count; <masak> there's probably something submittable in there, but it doesn't look golf'd. <masak> segfault reproduced. golfing. <Ven> ah, thanks :) < masak> m: role S[::N] { N::x } <camelia> rakudo-moar 4a7429: OUTPUT«(signal )» * masak submits rakudobug <masak> m: sub foo(::N) { N::x } <camelia> rakudo-moar 4a7429: OUTPUT«(signal )» <Ven> masak++ # golfing while I'm having fun <masak> m: my (::N); N::x * moritz could imagine that masak++ is also having fun <camelia> rakudo-moar 4a7429: OUTPUT«(signal )» <masak> definitely having fun :) It does make sense to :: into a type capture, as Ven's bigger example shows. But it seems it's done "too soon", and it blows up some sensitive internal bit or other.
RT-Send-CC: perl6-compiler [...] perl.org
The segfaults are mostly gone. Only on parrot there is a Null PMC Access, but only for two of the four examples. With said two examples there is an (non segfaulting) error on Moar and JVM as well: $ perl6 -e 'role S[::N] { N::x }' ## no error on Moar, Parrot and JVM $ perl6 -e 'sub foo(::N) { N::x }' ## no error on Moar, Parrot and JVM $ perl6-m -e 'my (::N); N::x' Cannot call method 'at_key' on a null object in block <unit> at -e:1 $ perl6-j -e 'my (::N); N::x' Can not call method 'at_key' on a null object in block <unit> at -e:1 $ perl6-p -e 'my (::N); N::x' Null PMC access in find_method('at_key') in block <unit> at -e:1 $ cat 122716.pl6 role Zero { constant count = 0; } role Suc[::N] { constant count = 1 + N::count; } subset _0 of Zero; subset _1 of Suc[Zero]; subset _2 of Suc[_1]; say Suc[Suc[Suc[Zero]]]::count; $ perl6-m 122716.pl6 ===SORRY!=== Cannot call method 'at_key' on a null object $ perl6-j 122716.pl6 ===SORRY!=== Can not call method 'at_key' on a null object $ perl6-p 122716.pl6 ===SORRY!=== Null PMC access in find_method('at_key')
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 1.3k
On Sat Jan 24 14:17:53 2015, bartolin@gmx.de wrote: Show quoted text
> The segfaults are mostly gone. Only on parrot there is a Null PMC > Access, but only for two of the four examples. With said two examples > there is an (non segfaulting) error on Moar and JVM as well: > > $ perl6 -e 'role S[::N] { N::x }' ## no error on Moar, Parrot and > JVM > > $ perl6 -e 'sub foo(::N) { N::x }' ## no error on Moar, Parrot and > JVM > > $ perl6-m -e 'my (::N); N::x' > Cannot call method 'at_key' on a null object > in block <unit> at -e:1 > > $ perl6-j -e 'my (::N); N::x' > Can not call method 'at_key' on a null object > in block <unit> at -e:1 > > $ perl6-p -e 'my (::N); N::x' > Null PMC access in find_method('at_key') > in block <unit> at -e:1 > > $ cat 122716.pl6 > role Zero { > constant count = 0; > } > role Suc[::N] { > constant count = 1 + N::count; > } > subset _0 of Zero; > subset _1 of Suc[Zero]; > subset _2 of Suc[_1]; > say Suc[Suc[Suc[Zero]]]::count; > > $ perl6-m 122716.pl6 > ===SORRY!=== > Cannot call method 'at_key' on a null object > > $ perl6-j 122716.pl6 > ===SORRY!=== > Can not call method 'at_key' on a null object > > $ perl6-p 122716.pl6 > ===SORRY!=== > Null PMC access in find_method('at_key')
With the segfaults gone, this bug report is closable. (For extra points, try to make sure that the failure mode is correct, but that's not mandatory to close the ticket.) -- Will "Coke" Coleda


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