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 last statement of a sub is empty or a CATCH block #537

Closed
p6rt opened this issue Dec 26, 2008 · 10 comments
Closed

Null PMC access when last statement of a sub is empty or a CATCH block #537

p6rt opened this issue Dec 26, 2008 · 10 comments

Comments

@p6rt
Copy link

p6rt commented Dec 26, 2008

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

Searchable as RT61732$

@p6rt
Copy link
Author

p6rt commented Dec 26, 2008

From @masak

<ruoso> rakudo​: sub foo { fail 'foo'; }; sub bar { foo(); 2; CATCH {
when Str {1} } }; say bar();
<masak> ah.
<p6eval> rakudo 34376​: OUTPUT«Null PMC access in isa() [...]
<masak> should we report the Null PMC access?
<ruoso> masak, sure..
* masak reports

@p6rt
Copy link
Author

p6rt commented Dec 26, 2008

From @masak

<ruoso> rakudo​: sub foo { fail }; sub bar { foo(); 2; CATCH { 1; } };
say bar();
<p6eval> rakudo 34376​: OUTPUT«Null PMC access in isa()␤ [...]
<ruoso> meh
<masak> that's strange.
<masak> that one didn't involve any 'whan' clause.
<masak> no smartmatching.
<masak> I might have misdiagnosed the bug in my summary, then.
* masak corrects

@p6rt
Copy link
Author

p6rt commented Dec 26, 2008

@masak - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Feb 15, 2009

From @bacek

On Fri Dec 26 05​:05​:27 2008, masak wrote​:

<ruoso> rakudo​: sub foo { fail }; sub bar { foo(); 2; CATCH { 1; } };
say bar();
<p6eval> rakudo 34376​: OUTPUT«Null PMC access in isa()␤ [...]
<ruoso> meh
<masak> that's strange.
<masak> that one didn't involve any 'whan' clause.
<masak> no smartmatching.
<masak> I might have misdiagnosed the bug in my summary, then.
* masak corrects

Actual summary should be "CATCH blocks eats return values from subs".

$ ../../parrot perl6.pbc -e 'sub bar { 1; CATCH { } }; say bar()'
Null PMC access in isa()

--
Bacek.

@p6rt
Copy link
Author

p6rt commented Feb 15, 2009

From @bacek

On Sat Feb 14 21​:22​:35 2009, bacek wrote​:

On Fri Dec 26 05​:05​:27 2008, masak wrote​:

<ruoso> rakudo​: sub foo { fail }; sub bar { foo(); 2; CATCH { 1; } };
say bar();
<p6eval> rakudo 34376​: OUTPUT«Null PMC access in isa()␤ [...]
<ruoso> meh
<masak> that's strange.
<masak> that one didn't involve any 'whan' clause.
<masak> no smartmatching.
<masak> I might have misdiagnosed the bug in my summary, then.
* masak corrects

Actual summary should be "CATCH blocks eats return values from subs".

$ ../../parrot perl6.pbc -e 'sub bar { 1; CATCH { } }; say bar()'
Null PMC access in isa()

Even worse... Problem is in empty statement list.
$ ../../parrot perl6.pbc -e 'sub foo { 1;; }; say foo'
Null PMC access in isa()

--
Bacek

@p6rt
Copy link
Author

p6rt commented Jul 13, 2009

From @kyleha

This is an automatically generated mail to inform you that tests are now available in b/t/spec/S06-advanced_subroutine_features/return.t

@p6rt
Copy link
Author

p6rt commented Jan 31, 2011

From @coke

On Sat Feb 14 21​:33​:06 2009, bacek wrote​:

Even worse... Problem is in empty statement list.
$ ../../parrot perl6.pbc -e 'sub foo { 1;; }; say foo'
Null PMC access in isa()

This particular item now generates​:

00​:51 <[Coke]> rakudo​: sub foo { 1;; }; say foo
00​:51 <p6eval> rakudo 549d2a​: OUTPUT«1␤»

(but everything else still NPEs)

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Jan 31, 2011

From @coke

On Sat Feb 14 21​:22​:35 2009, bacek wrote​:

Actual summary should be "CATCH blocks eats return values from subs".

$ ../../parrot perl6.pbc -e 'sub bar { 1; CATCH { } }; say bar()'
Null PMC access in isa()

Note that it seems to be the implicit return that's a problem​:

01​:00 <[Coke]> rakudo​: sub bar { return 1; CATCH { } }; say bar()
01​:00 <p6eval> rakudo 549d2a​: OUTPUT«1␤»

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Oct 16, 2011

From @moritz

The Null PMC Access is now gone, closing the ticket.

@p6rt
Copy link
Author

p6rt commented Oct 16, 2011

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

@p6rt p6rt closed this as completed Oct 16, 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