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 definedness of placeholder parameter is evaluated inside 'repeat while' block in Rakudo #1283

Closed
p6rt opened this issue Sep 16, 2009 · 7 comments

Comments

@p6rt
Copy link

p6rt commented Sep 16, 2009

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

Searchable as RT69178$

@p6rt
Copy link
Author

p6rt commented Sep 16, 2009

From @masak

<masak> I smell a Null PMC access in the Force...
<masak> rakudo​: repeat while True {}
<p6eval> rakudo 446d49​: ( no output )
<masak> rakudo​: my $a = 1; repeat while $a&lt; 10 { $^a.defined.say; }
<p6eval> rakudo 446d49​: OUTPUT«Null PMC access in find_method()
* masak submits rakudobug

Minimizing this a bit further, the program 'repeat while True {
$^a.defined }' seems to do the trick

@p6rt
Copy link
Author

p6rt commented Jul 28, 2010

From @coke

On Wed Sep 16 14​:51​:47 2009, masak wrote​:

<masak> I smell a Null PMC access in the Force...
<masak> rakudo​: repeat while True {}
<p6eval> rakudo 446d49​: ( no output )
<masak> rakudo​: my $a = 1; repeat while $a&lt; 10 { $^a.defined.say; }
<p6eval> rakudo 446d49​: OUTPUT«Null PMC access in find_method()
* masak submits rakudobug

Minimizing this a bit further, the program 'repeat while True {
$^a.defined }' seems to do the trick

This no longer generates an NPE​:

$ ./perl6

repeat while True { $^a.defined }
Method 'defined' not found for invocant of class 'Undef'

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Jul 28, 2010

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

@p6rt
Copy link
Author

p6rt commented Feb 23, 2011

From @moritz

Now​: Null PMC access in type()

@p6rt
Copy link
Author

p6rt commented May 28, 2012

From @coke

On Wed Sep 16 14​:51​:47 2009, masak wrote​:

<masak> I smell a Null PMC access in the Force...
<masak> rakudo​: repeat while True {}
<p6eval> rakudo 446d49​: ( no output )
<masak> rakudo​: my $a = 1; repeat while $a&lt; 10 { $^a.defined.say; }
<p6eval> rakudo 446d49​: OUTPUT�Null PMC access in find_method()
* masak submits rakudobug

Minimizing this a bit further, the program 'repeat while True {
$^a.defined }' seems to do the trick

This now loops infinitely, generating a lot of output.

Closable with tests.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Jun 5, 2012

From @moritz

Now tested in S04-statements/repeat.t

@p6rt
Copy link
Author

p6rt commented Jun 5, 2012

@moritz - 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