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

Null PMC access when doing .assuming on a routine that doesn't resolve/exist in Rakudo #2185

Closed
p6rt opened this issue Sep 23, 2010 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Sep 23, 2010

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

Searchable as RT78012$

@p6rt
Copy link
Author

p6rt commented Sep 23, 2010

From @masak

<masak> rakudo​: class A { method b { 'b' } }; my $a = A.new; my $b =
&A​::b.assuming($a); $b()
<p6eval> rakudo 8156be​: OUTPUT«Null PMC access in invoke() [...]
<moritz_> LTA error
<masak> rakudo​: class A {}; my $a = A.new; &A​::b.assuming($a)()
<p6eval> rakudo 8156be​: OUTPUT«Null PMC access in invoke() [...]
* masak submits rakudobug
<moritz_> rakudo​: class A { our method b { 'b' } }; my $a = A.new;
&A​::b.assuming($a)()
<p6eval> rakudo 8156be​: ( no output )
<masak> ash_++ and TimToady++ for discovering it.

@p6rt
Copy link
Author

p6rt commented Oct 14, 2011

From @coke

On Thu Sep 23 06​:22​:16 2010, masak wrote​:

<masak> rakudo​: class A { method b { 'b' } }; my $a = A.new; my $b =
&A​::b.assuming($a); $b()
<p6eval> rakudo 8156be​: OUTPUT�Null PMC access in invoke() [...]
<moritz_> LTA error
<masak> rakudo​: class A {}; my $a = A.new; &A​::b.assuming($a)()
<p6eval> rakudo 8156be​: OUTPUT�Null PMC access in invoke() [...]
* masak submits rakudobug
<moritz_> rakudo​: class A { our method b { 'b' } }; my $a = A.new;
&A​::b.assuming($a)()
<p6eval> rakudo 8156be​: ( no output )
<masak> ash_++ and TimToady++ for discovering it.

15​:43 < [Coke]> rakudo​: class A { method b { 'b' } }; my $a = A.new; my
$b =
  &A​::b.assuming($a); $b()
15​:43 <+p6eval> rakudo ce15be​: OUTPUT«Method 'assuming' not found for
invocant
  of class 'Any'␤ in block <anon> at /tmp/6__8CGzj6s​:1␤
in
  <anon> at /tmp/6__8CGzj6s​:1␤»
15​:43 < [Coke]> is .assuming also gone?
15​:43 < jnthn> No, assuming is there
15​:43 < jnthn> But A​::b is (correctly) not
15​:44 < jnthn> The method has to be decalred "our" for that to work.
15​:44 < [Coke]> rakudo​: class A { our method b { 'b' } }; my $a = A.new;
my $b
  = &A​::b.assuming($a); $b()
15​:44 <+p6eval> rakudo ce15be​: ( no output )
15​:44 < [Coke]> k.
15​:44 < [Coke]> jnthn++

So, No more null PMC access.

Closable with tests.
--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Oct 14, 2011

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jan 26, 2014

From @peschwa

Am Fr 14. Okt 2011, 12​:45​:44, coke schrieb​:

On Thu Sep 23 06​:22​:16 2010, masak wrote​:

<masak> rakudo​: class A { method b { 'b' } }; my $a = A.new; my $b =
&A​::b.assuming($a); $b()
<p6eval> rakudo 8156be​: OUTPUT�Null PMC access in invoke() [...]
<moritz_> LTA error
<masak> rakudo​: class A {}; my $a = A.new; &A​::b.assuming($a)()
<p6eval> rakudo 8156be​: OUTPUT�Null PMC access in invoke() [...]
* masak submits rakudobug
<moritz_> rakudo​: class A { our method b { 'b' } }; my $a = A.new;
&A​::b.assuming($a)()
<p6eval> rakudo 8156be​: ( no output )
<masak> ash_++ and TimToady++ for discovering it.

15​:43 < [Coke]> rakudo​: class A { method b { 'b' } }; my $a = A.new; my
$b =
&A​::b.assuming($a); $b()
15​:43 <+p6eval> rakudo ce15be​: OUTPUT«Method 'assuming' not found for
invocant
of class 'Any'␤ in block <anon> at /tmp/6__8CGzj6s​:1␤
in
<anon> at /tmp/6__8CGzj6s​:1␤»
15​:43 < [Coke]> is .assuming also gone?
15​:43 < jnthn> No, assuming is there
15​:43 < jnthn> But A​::b is (correctly) not
15​:44 < jnthn> The method has to be decalred "our" for that to work.
15​:44 < [Coke]> rakudo​: class A { our method b { 'b' } }; my $a = A.new;
my $b
= &A​::b.assuming($a); $b()
15​:44 <+p6eval> rakudo ce15be​: ( no output )
15​:44 < [Coke]> k.
15​:44 < [Coke]> jnthn++

So, No more null PMC access.

Closable with tests.

Added test to roast in commit 8fe2db8 as per the example above.

@p6rt p6rt closed this as completed Jan 26, 2014
@p6rt
Copy link
Author

p6rt commented Jan 26, 2014

@FROGGS - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant