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 BUILD method with bang-twigilled hash parameter is called without the corresponding argument in Rakudo #2450

Closed
p6rt opened this issue Jul 21, 2011 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Jul 21, 2011

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

Searchable as RT95340$

@p6rt
Copy link
Author

p6rt commented Jul 21, 2011

From @masak

<masak> is this a known bug?
<masak> rakudo​: class C { has %!p; submethod BUILD(​:%!p) {} }; C.new;
say "alive"
<p6eval> rakudo 922500​: OUTPUT«Null PMC access in invoke() [...]
<moritz> nom​: class C { has %!p; submethod BUILD(​:%!p) {} }; C.new; say 'alive'
<p6eval> nom​: OUTPUT«alive␤»
* masak submits rakudobug
<masak> rakudo​: class C { has $!p; submethod BUILD(​:$!p) {} }; C.new;
say "alive"
<p6eval> rakudo 922500​: OUTPUT«alive␤»
<masak> rakudo​: class C { has @​!p; submethod BUILD(​:@​!p) {} }; C.new;
say "alive"
<p6eval> rakudo 922500​: OUTPUT«alive␤»
<masak> rakudo​: class C { has &!p; submethod BUILD(​:&!p) {} }; C.new;
say "alive"
<p6eval> rakudo 922500​: OUTPUT«alive␤»

So, only fails for hashes; works in nom.

@p6rt
Copy link
Author

p6rt commented Feb 10, 2012

From @jnthn

On Thu Jul 21 14​:06​:49 2011, masak wrote​:

<masak> is this a known bug?
<masak> rakudo​: class C { has %!p; submethod BUILD(​:%!p) {} }; C.new;
say "alive"
<p6eval> rakudo 922500​: OUTPUT«Null PMC access in invoke() [...]
<moritz> nom​: class C { has %!p; submethod BUILD(​:%!p) {} }; C.new;
say 'alive'
<p6eval> nom​: OUTPUT«alive␤»
* masak submits rakudobug
<masak> rakudo​: class C { has $!p; submethod BUILD(​:$!p) {} }; C.new;
say "alive"
<p6eval> rakudo 922500​: OUTPUT«alive␤»
<masak> rakudo​: class C { has @​!p; submethod BUILD(​:@​!p) {} }; C.new;
say "alive"
<p6eval> rakudo 922500​: OUTPUT«alive␤»
<masak> rakudo​: class C { has &!p; submethod BUILD(​:&!p) {} }; C.new;
say "alive"
<p6eval> rakudo 922500​: OUTPUT«alive␤»

So, only fails for hashes; works in nom.

Confirmed still working in nom; tagging testneeded.

class C { has %!p; submethod BUILD(​:%!p) {} }; C.new;
C.new()

/jnthn

@p6rt
Copy link
Author

p6rt commented Feb 10, 2012

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

@p6rt
Copy link
Author

p6rt commented Mar 4, 2012

From @moritz

Now tested in S12-construction/BUILD.t

@p6rt
Copy link
Author

p6rt commented Mar 4, 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