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

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

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



From: Aleks-Daniel Jakimenko-Aleksejev <alex.jakimenko [...] gmail.com>
Date: Wed, 9 Dec 2015 19:51:57 +0200
To: rakudobug [...] perl.org
Subject: Segmentation fault (my ([$a]); $a.WHAT)
Download (untitled) / with headers
text/plain 531b
Code:
my ([$a]); $a.WHAT

Result:
Segmentation fault


This was found by _nadim (http://irclog.perlgeek.de/perl6/2015-12-09#i_11685717)

It is interesting that someone stumbled upon it.


So! We can make it mention “null object” like this:
my ([$a]); $a.say

Result:
Cannot call method 'say' on a null object
  in block <unit> at ./test3.pl:2


Though it kinda works if you just “say” it:
my ([$a]); say $a

Result:
(Mu)


I am not sure what this code should produce. But at least it should not segfault, that's for sure.
Download (untitled) / with headers
text/plain 1012b
On Wed Dec 09 09:52:15 2015, alex.jakimenko@gmail.com wrote: Show quoted text
> Code: > my ([$a]); $a.WHAT > > Result: > Segmentation fault > > > This was found by _nadim ( > http://irclog.perlgeek.de/perl6/2015-12-09#i_11685717) > > It is interesting that someone stumbled upon it. > > > So! We can make it mention “null object” like this: > my ([$a]); $a.say > > Result: > Cannot call method 'say' on a null object > in block <unit> at ./test3.pl:2 > > > Though it kinda works if you just “say” it: > my ([$a]); say $a > > Result: > (Mu)
Valgrind output: ==28589== Invalid read of size 8 ==28589== at 0x4F98777: MVM_interp_run (in /home/moritz/p6/rakudo/install/lib/libmoar.so) ==28589== by 0x5049318: MVM_vm_run_file (in /home/moritz/p6/rakudo/install/lib/libmoar.so) ==28589== by 0x400FBE: main (in /home/moritz/p6/rakudo/install/bin/moar) ==28589== Address 0x10 is not stack'd, malloc'd or (recently) free'd Looks like a null-pointer dereference to me. No idea where it's coming from though.
Download (untitled) / with headers
text/plain 321b
Similarly to ticket #127254, this does not segfault for me on an upt-to-date Rakduo Moar. Here's what it prints: my ([$a]); say $a.WHAT; # (Mu) say $a.^name; # VMNull say $a.gist; # Cannot call method 'gist' on a null object Please check if you can still reproduce the crash after updating Rakudo.
Well, the crash is no longer there, but it shouldn't be a VMNull.

This problem was observed again today in this discussion: http://colabti.org/irclogger/irclogger_log/perl6?date=2017-10-11#l104


On 2016-05-11 05:05:20, smls75@gmail.com wrote:
Show quoted text
> Similarly to ticket #127254, this does not segfault for me on an upt-
> to-date Rakduo Moar.
>
> Here's what it prints:
>
> my ([$a]);
> say $a.WHAT; # (Mu)
> say $a.^name; # VMNull
> say $a.gist; # Cannot call method 'gist' on a null object
>
> Please check if you can still reproduce the crash after updating
> Rakudo.




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