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 A.perl is called on a package A #976

Closed
p6rt opened this issue May 5, 2009 · 7 comments
Closed

Null PMC access when A.perl is called on a package A #976

p6rt opened this issue May 5, 2009 · 7 comments

Comments

@p6rt
Copy link

p6rt commented May 5, 2009

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

Searchable as RT65404$

@p6rt
Copy link
Author

p6rt commented May 5, 2009

From @masak

<PerlJam> rakudo​: package A​::B {}; say A​::B.perl;
<p6eval> rakudo ee10f5​: OUTPUT«Null PMC access in getprop() [...]
<PerlJam> I wonder if that should work
<masak> it shouldn't throw that error, at least.
* masak submits rakudobug
<PerlJam> right
<jnthn> aye
<jnthn> I'm not entirely sure what it should do.
<jnthn> But not that. Never that. :-)
<PerlJam> rakudo​: class A​::B {}; say A​::B.perl
<p6eval> rakudo ee10f5​: OUTPUT«A​::B␤»
<PerlJam> (just checking :)
<masak> rakudo​: package A {}; say A.perl
<p6eval> rakudo ee10f5​: OUTPUT«Null PMC access in getprop() [...]

@p6rt
Copy link
Author

p6rt commented Jun 19, 2009

From @avar

Tested on 1b06df80900096dab8a9f74467f504f73a6115dd

avar@​aoeu​:~/src/rakudo$ ./perl6 -e 'use Test; plan 1; package Empty
{}; lives_ok {Empty.perl ne "tbd"}, "test for working .perl method"'
1..1
not ok 1 - test for working .perl method
# Looks like you failed 1 tests of 1
Segmentation fault

That's a reduced version of this test which was spewing errors​:

avar@​aoeu​:~/src/rakudo$ ./perl6 t/spec/S10-packages/basic.rakudo
1..22
ok 1 - class test
not ok 2 - autovivification(?) for nested packages# TODO ticket uses
role; RT #​62900
not ok 3 - test for working .perl method# TODO RT #​65404
not ok 4 - Non-existant sub through package# TODO RT #​62970
not ok 5 - dot notation with package# TODO RT #​63432
not ok 6 - enum in package# TODO RT #​63826
not ok 7 - access to $?PACKAGE variable# TODO RT #​59484
not ok 8 - some WHO implementation# TODO ticket based only on class; RT #​60446
not ok 9 - WHO implementation with longname# TODO ticket based only on
class; RT #​60446
ok 10 - can refer to role using package
not ok 11 - since role is in package should not need package name#
TODO ticket based on module; RT #​63510
not ok 12 - two different packages should be two different Baz# TODO
ticket based on class(es) not package; RT #​65022
not ok 13 - two different packages should be two different EHomeE#
TODO ticket based on class(es) not package; RT #​65022
ok 14 - # SKIP ticket based on module; RT #​64876
not ok 15 - map in package# TODO RT #​64606
not ok 16 - use outer lexical# TODO ticket used class; RT #​61356
not ok 17 - use outer package var# TODO ticket used class; RT #​63588
not ok 18 - Should be able to update outer package var# TODO ticket
used class; RT #​63588
not ok 19 - simple package case that should not blow platform# TODO RT #​64204
not ok 20 - another simple package case that should not blow platform#
TODO RT #​64204
ok 21 - # SKIP RT #​64606
ok 22 - array initialization works fine in imported subs
# FUDGED!
src/call/pcc.c​:613​: failed assertion 'PObj_is_PMC_TEST(sig_pmc)'
Backtrace - Obtained 27 stack frames (max trace depth is 32).
  (unknown)
  Parrot_confess
  Parrot_init_arg_op
  (unknown)
  (unknown)
  Parrot_run_meth_fromc_args
  (unknown)
  (unknown)
  (unknown)
  (unknown)
  (unknown)
  (unknown)
  (unknown)
  Parrot_runops_fromc_args
  Parrot_ex_throw_from_c
  (unknown)
  (unknown)
  (unknown)
  (unknown)
  (unknown)
  (unknown)
  (unknown)
  Parrot_runops_fromc_args
  Parrot_runcode
  (unknown)
  __libc_start_main
  (unknown)
Aborted

Other people in #perl6 tried this without getting a segfault, my platform is​:

avar@​aoeu​:~/src/rakudo$ uname -a
Linux aoeu 2.6.28-11-generic #​42-Ubuntu SMP Fri Apr 17 01​:57​:59 UTC
2009 i686 GNU/Linux

@p6rt
Copy link
Author

p6rt commented Nov 19, 2009

From @kyleha

There's a test for this in S10-packages/basic.t

@p6rt
Copy link
Author

p6rt commented Nov 19, 2009

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

@p6rt
Copy link
Author

p6rt commented Sep 9, 2011

From @bbkr

NOM

works correct

bbkr​:nom bbkr$ ./perl6 -e 'package A​::B {}; say A​::B.perl;'
A​::B

@p6rt
Copy link
Author

p6rt commented Sep 11, 2011

From @bbkr

Test unfudged and passing.

Note​: there are some errors in test file that prevents it from compile
on NOM, so passing was checked with faulty lines commented.

@p6rt
Copy link
Author

p6rt commented Sep 11, 2011

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

@p6rt p6rt closed this as completed Sep 11, 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