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 declaring operator with a backslash in Rakudo #3041

Closed
p6rt opened this issue Feb 5, 2013 · 9 comments
Closed

Null PMC access when declaring operator with a backslash in Rakudo #3041

p6rt opened this issue Feb 5, 2013 · 9 comments
Labels
Bug

Comments

@p6rt
Copy link

@p6rt p6rt commented Feb 5, 2013

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

Searchable as RT116643$

@p6rt

This comment has been minimized.

Copy link
Author

@p6rt p6rt commented Feb 5, 2013

From @masak

<tadzik> masak​: I have a shiny new rakudobug for you
<masak> ooh
<tadzik> r​: sub prefix​:<\o/>($) { }
<p6eval> rakudo 935c90​: OUTPUT«Null PMC access in find_method('clone') [...]
<masak> r​: sub prefix​:<\p>($) {}
<p6eval> rakudo 935c90​: OUTPUT«Null PMC access in find_method('clone') [...]
<masak> r​: sub prefix​:<\a>($) {}
<p6eval> rakudo 935c90​: OUTPUT«Null PMC access in find_method('clone') [...]
<masak> r​: sub prefix​:<\\>($) {}
<p6eval> rakudo 935c90​: OUTPUT«Null PMC access in find_method('clone') [...]
<masak> ok, backslashes in preifx ops. got it.
<masak> r​: sub postfix​:<\\>($) {}
<p6eval> rakudo 935c90​: OUTPUT«Null PMC access in find_method('clone') [...]
<masak> r​: sub infix​:<\\>($) {}
<p6eval> rakudo 935c90​: OUTPUT«Null PMC access in find_method('clone') [...]
* masak submits rakudobug

@p6rt

This comment has been minimized.

Copy link
Author

@p6rt p6rt commented Oct 7, 2014

From @usev6

On Moar and on JVM all of those declarations run fine. On Parrot the errors are still the same. I added tests (fudged for Parrot) for two of the different declarations to S06-operator-overloading/sub.t with the following commit​: Raku/roast@dea36c4

1 similar comment
@p6rt

This comment has been minimized.

Copy link
Author

@p6rt p6rt commented Oct 7, 2014

From @usev6

On Moar and on JVM all of those declarations run fine. On Parrot the errors are still the same. I added tests (fudged for Parrot) for two of the different declarations to S06-operator-overloading/sub.t with the following commit​: Raku/roast@dea36c4

@p6rt

This comment has been minimized.

Copy link
Author

@p6rt p6rt commented Oct 7, 2014

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

@p6rt

This comment has been minimized.

Copy link
Author

@p6rt p6rt commented Oct 7, 2014

From @usev6

As FROGGS pointed out on IRC (http://irclog.perlgeek.de/perl6/2014-10-07#i_9469198) the behaviour on Parrot is not exactly as last year. I did a fresh build and now I get the "Null PMC access" errors only when putting the declaration in an extra block. (That's what happening in my tests where I use 'lives_ok { sub postfix​:<\\>($) {} }, "OK"')

So for Rakudo on newly built Parrot​:

sub postfix​:< p >($) {}; say "alive"
alive
{ sub postfix​:< \p >($) {}; }; say "alive"
Null PMC access in find_method('clone')

$ perl6-p -e 'sub postfix​:<\\>($) {}; say "alive"'
alive
$ perl6-p -e '{ sub postfix​:<\\>($) {} }; say "alive"'
Null PMC access in find_method('clone')
  in block <unit> at -e​:1

$ perl6-p -e 'use Test; lives_ok { sub prefix​:<\\>($) {} }, "OK"'
not ok 1 - OK
# Failed test 'OK'
# at -e line 1
# Null PMC access in find_method('clone')

1 similar comment
@p6rt

This comment has been minimized.

Copy link
Author

@p6rt p6rt commented Oct 7, 2014

From @usev6

As FROGGS pointed out on IRC (http://irclog.perlgeek.de/perl6/2014-10-07#i_9469198) the behaviour on Parrot is not exactly as last year. I did a fresh build and now I get the "Null PMC access" errors only when putting the declaration in an extra block. (That's what happening in my tests where I use 'lives_ok { sub postfix​:<\\>($) {} }, "OK"')

So for Rakudo on newly built Parrot​:

sub postfix​:< p >($) {}; say "alive"
alive
{ sub postfix​:< \p >($) {}; }; say "alive"
Null PMC access in find_method('clone')

$ perl6-p -e 'sub postfix​:<\\>($) {}; say "alive"'
alive
$ perl6-p -e '{ sub postfix​:<\\>($) {} }; say "alive"'
Null PMC access in find_method('clone')
  in block <unit> at -e​:1

$ perl6-p -e 'use Test; lives_ok { sub prefix​:<\\>($) {} }, "OK"'
not ok 1 - OK
# Failed test 'OK'
# at -e line 1
# Null PMC access in find_method('clone')

@p6rt

This comment has been minimized.

Copy link
Author

@p6rt p6rt commented Nov 18, 2014

From @FROGGS

Latest parrot does it​:

FROGGS p​: { sub postfix​:<\\>($) {} }; say "alive"
camelia rakudo-parrot f2ffb9​: OUTPUT«alive␤»

FROGGS p​: { sub postfix​:<\\>($) {}; say 42\\ }; say "alive"
camelia rakudo-parrot f2ffb9​: OUTPUT«Nil␤alive␤»

@p6rt

This comment has been minimized.

Copy link
Author

@p6rt p6rt commented Nov 18, 2014

From @FROGGS

Fixed in parrot in commits up to​: parrot/parrot@7bc5452
Tests​: Raku/roast@a8a495c

@p6rt

This comment has been minimized.

Copy link
Author

@p6rt p6rt commented Nov 18, 2014

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

@p6rt p6rt closed this Nov 18, 2014
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.