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

when digging into the package namespace of a type capture in Rakudo #3506

Open
p6rt opened this issue Sep 6, 2014 · 5 comments
Open

when digging into the package namespace of a type capture in Rakudo #3506

p6rt opened this issue Sep 6, 2014 · 5 comments
Labels

Comments

@p6rt
Copy link

@p6rt p6rt commented Sep 6, 2014

Migrated from rt.perl.org#122716 (status was 'open')

Searchable as RT122716$

@p6rt

This comment has been minimized.

Copy link
Author

@p6rt p6rt commented Sep 6, 2014

From @masak

<Ven> Oooh, I got a segfault!
<Ven> https://gist.github.com/Nami-Doc/f0232a94cec52f0ec14c <- this
segfaults here :)

Code inlined for great justice​:

role Zero {
  constant count = 0;
}
role Suc[​::N] {
  constant count = 1 + N​::count;
}

subset _0 of Zero;
subset _1 of Suc[Zero];
subset _2 of Suc[_1];
# and on and on ...

say Suc[Suc[Suc[Zero]]]​::count;

<masak> there's probably something submittable in there, but it
doesn't look golf'd.
<masak> segfault reproduced. golfing.
<Ven> ah, thanks :)
< masak> m​: role S[​::N] { N​::x }
<camelia> rakudo-moar 4a7429​: OUTPUT«(signal )»
* masak submits rakudobug
<masak> m​: sub foo(​::N) { N​::x }
<camelia> rakudo-moar 4a7429​: OUTPUT«(signal )»
<Ven> masak++ # golfing while I'm having fun
<masak> m​: my (​::N); N​::x
* moritz could imagine that masak++ is also having fun
<camelia> rakudo-moar 4a7429​: OUTPUT«(signal )»
<masak> definitely having fun :)

It does make sense to :​: into a type capture, as Ven's bigger example
shows. But it seems it's done "too soon", and it blows up some
sensitive internal bit or other.

@p6rt

This comment has been minimized.

Copy link
Author

@p6rt p6rt commented Jan 24, 2015

From @usev6

The segfaults are mostly gone. Only on parrot there is a Null PMC Access, but only for two of the four examples. With said two examples there is an (non segfaulting) error on Moar and JVM as well​:

$ perl6 -e 'role S[​::N] { N​::x }' ## no error on Moar, Parrot and JVM

$ perl6 -e 'sub foo(​::N) { N​::x }' ## no error on Moar, Parrot and JVM

$ perl6-m -e 'my (​::N); N​::x'
Cannot call method 'at_key' on a null object
  in block <unit> at -e​:1

$ perl6-j -e 'my (​::N); N​::x'
Can not call method 'at_key' on a null object
  in block <unit> at -e​:1

$ perl6-p -e 'my (​::N); N​::x'
Null PMC access in find_method('at_key')
  in block <unit> at -e​:1

$ cat 122716.pl6
role Zero {
  constant count = 0;
}
role Suc[​::N] {
  constant count = 1 + N​::count;
}
subset _0 of Zero;
subset _1 of Suc[Zero];
subset _2 of Suc[_1];
say Suc[Suc[Suc[Zero]]]​::count;

$ perl6-m 122716.pl6
===SORRY!===
Cannot call method 'at_key' on a null object

$ perl6-j 122716.pl6
===SORRY!===
Can not call method 'at_key' on a null object

$ perl6-p 122716.pl6
===SORRY!===
Null PMC access in find_method('at_key')

1 similar comment
@p6rt

This comment has been minimized.

Copy link
Author

@p6rt p6rt commented Jan 24, 2015

From @usev6

The segfaults are mostly gone. Only on parrot there is a Null PMC Access, but only for two of the four examples. With said two examples there is an (non segfaulting) error on Moar and JVM as well​:

$ perl6 -e 'role S[​::N] { N​::x }' ## no error on Moar, Parrot and JVM

$ perl6 -e 'sub foo(​::N) { N​::x }' ## no error on Moar, Parrot and JVM

$ perl6-m -e 'my (​::N); N​::x'
Cannot call method 'at_key' on a null object
  in block <unit> at -e​:1

$ perl6-j -e 'my (​::N); N​::x'
Can not call method 'at_key' on a null object
  in block <unit> at -e​:1

$ perl6-p -e 'my (​::N); N​::x'
Null PMC access in find_method('at_key')
  in block <unit> at -e​:1

$ cat 122716.pl6
role Zero {
  constant count = 0;
}
role Suc[​::N] {
  constant count = 1 + N​::count;
}
subset _0 of Zero;
subset _1 of Suc[Zero];
subset _2 of Suc[_1];
say Suc[Suc[Suc[Zero]]]​::count;

$ perl6-m 122716.pl6
===SORRY!===
Cannot call method 'at_key' on a null object

$ perl6-j 122716.pl6
===SORRY!===
Can not call method 'at_key' on a null object

$ perl6-p 122716.pl6
===SORRY!===
Null PMC access in find_method('at_key')

@p6rt

This comment has been minimized.

Copy link
Author

@p6rt p6rt commented Jan 24, 2015

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

@p6rt

This comment has been minimized.

Copy link
Author

@p6rt p6rt commented Aug 29, 2015

From @coke

On Sat Jan 24 14​:17​:53 2015, bartolin@​gmx.de wrote​:

The segfaults are mostly gone. Only on parrot there is a Null PMC
Access, but only for two of the four examples. With said two examples
there is an (non segfaulting) error on Moar and JVM as well​:

$ perl6 -e 'role S[​::N] { N​::x }' ## no error on Moar, Parrot and
JVM

$ perl6 -e 'sub foo(​::N) { N​::x }' ## no error on Moar, Parrot and
JVM

$ perl6-m -e 'my (​::N); N​::x'
Cannot call method 'at_key' on a null object
in block <unit> at -e​:1

$ perl6-j -e 'my (​::N); N​::x'
Can not call method 'at_key' on a null object
in block <unit> at -e​:1

$ perl6-p -e 'my (​::N); N​::x'
Null PMC access in find_method('at_key')
in block <unit> at -e​:1

$ cat 122716.pl6
role Zero {
constant count = 0;
}
role Suc[​::N] {
constant count = 1 + N​::count;
}
subset _0 of Zero;
subset _1 of Suc[Zero];
subset _2 of Suc[_1];
say Suc[Suc[Suc[Zero]]]​::count;

$ perl6-m 122716.pl6
===SORRY!===
Cannot call method 'at_key' on a null object

$ perl6-j 122716.pl6
===SORRY!===
Can not call method 'at_key' on a null object

$ perl6-p 122716.pl6
===SORRY!===
Null PMC access in find_method('at_key')

With the segfaults gone, this bug report is closable. (For extra points, try to make sure that the failure mode is correct, but that's not mandatory to close the ticket.)

--
Will "Coke" Coleda

@p6rt p6rt added the SEGV 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
1 participant
You can’t perform that action at this time.