Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rakudo crash with Null PMC access in get_repr() #2063

Closed
p6rt opened this issue Aug 12, 2010 · 4 comments
Closed

Rakudo crash with Null PMC access in get_repr() #2063

p6rt opened this issue Aug 12, 2010 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Aug 12, 2010

Migrated from rt.perl.org#77178 (status was 'resolved')

Searchable as RT77178$

@p6rt
Copy link
Author

p6rt commented Aug 12, 2010

From q@cono.org.ua

# git rev-parse HEAD
69561ef449a81aee22189229e9724ea23565e6ee

13​:22 < cono> rakudo​: class A​::B { has $.s = "hey" }; my $q = "B"; my
$l = gather { take "A​::$q".new; }; $l[0].s.say
13​:22 <+p6eval> rakudo 69561e​: OUTPUT«Null PMC access in get_repr()␤
in <anon> at line 22​:/tmp/kBN02ALah1␤ in
  'List​::at_pos' at line 1␤ in 'Any​::postcircumfix​:<[
]>' at line 1658​:CORE.setting␤ in main program body
  at line 1␤»
13​:22 < cono> Found how to reproduce ;)
13​:22 < moritz_> rakudo​: class A​::B { has $.s = "hey" }; my $q = "B";
my $l = gather { take "A​::$q".new; }; $l[0]
13​:23 <+p6eval> rakudo 69561e​: OUTPUT«Null PMC access in get_repr()␤
in <anon> at line 22​:/tmp/Brx41cXyGM␤ in
  'List​::at_pos' at line 1␤ in 'Any​::postcircumfix​:<[
]>' at line 1658​:CORE.setting␤ in main program body
  at line 1␤»
13​:23 < moritz_> rakudo​: class A​::B { has $.s = "hey" }; my $q = "B";
my $l = gather { take "A​::$q".new; };
13​:23 <+p6eval> rakudo 69561e​: ( no output )
13​:23 < moritz_> rakudo​: class A​::B { has $.s = "hey" }; my $q = "B";
my $l = gather { take "A​::$q".new; }; $l.eager
13​:23 <+p6eval> rakudo 69561e​: OUTPUT«Null PMC access in get_repr()␤
in <anon> at line 22​:/tmp/7avPB0sgCd␤ in main
  program body at line 1␤»
13​:24 < cono> moritz_​: it's only possible if prefix namespace present
A​::, without it, all good
13​:24 < cono> rakudo​: class B { has $.s = "hey" }; my $q = "B"; my $l
= gather { take "$q".new; }; $l[0].s.say
13​:24 <+p6eval> rakudo 69561e​: OUTPUT«hey␤»
13​:24 < gfldex> cono​: rakudobug@​perl.org

--
Varyanick I. Alex
icq​: 102 575 440
skype​: cono..
q@​cono.org.ua

@p6rt
Copy link
Author

p6rt commented Aug 12, 2010

From q@cono.org.ua

Simplest way to reproduce​:
% perl6 -e 'class A​::B { method hey { "hello world".say } }; "A​::B".new.hey'
Null PMC access in get_repr()
  in main program body at line 1

% perl6 -e 'class A { method hey { "hello world".say } }; "A".new.hey'
hello world

% perl6 -e 'class A​::B { method hey { "hello world".say } }; A​::B.new.hey'
hello world

Error happened only if :​: present in Str.

--
Varyanick I. Alex
icq​: 102 575 440
skype​: cono..
q@​cono.org.ua

@p6rt
Copy link
Author

p6rt commented Oct 3, 2011

From @moritz

FWIW Str.new should have never done a lookup by name, and it has stopped
doing it now. Use :​:($typeName) for dynamic lookup.

@p6rt
Copy link
Author

p6rt commented Oct 3, 2011

@moritz - Status changed from 'new' to 'resolved'

@p6rt p6rt closed this as completed Oct 3, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant