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 illegally redefining a class inside an eval inside an ok() call from Test.pm #452

Closed
p6rt opened this issue Dec 5, 2008 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Dec 5, 2008

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

Searchable as RT61068$

@p6rt
Copy link
Author

p6rt commented Dec 5, 2008

From @masak

$ perl6 -v
This is Rakudo Perl 6, revision 33481 built on parrot 0.8.1-devel
for darwin-thread-multi-2level.

Copyright 2006-2008, The Perl Foundation.

$ cat nasty-bug
use Test;

class B {}
ok(eval('class B {}'));

$ md5 Test.pm
MD5 (Test.pm) = a53345a042f07d942f239830773cea54

$ perl6 nasty-bug
Null PMC access in type()
current instr.​: '_block11' pc 53 (EVAL_12​:19)
called from Sub 'parrot;PCT;HLLCompiler;eval' pc 892
(src/PCT/HLLCompiler.pir​:508)
called from Sub 'parrot;PCT;HLLCompiler;evalfiles' pc 1227
(src/PCT/HLLCompiler.pir​:674)
called from Sub 'parrot;PCT;HLLCompiler;command_line' pc 1403
(src/PCT/HLLCompiler.pir​:762)
called from Sub 'parrot;Perl6;Compiler;main' pc 16581 (perl6.pir​:168)
perl6(24754) malloc​: *** error for object 0x2f20160​: double free
*** set a breakpoint in malloc_error_break to debug
Segmentation fault

@p6rt
Copy link
Author

p6rt commented Jan 28, 2009

From @jnthn

On Fri Dec 05 14​:29​:52 2008, masak wrote​:

$ cat nasty-bug
use Test;

class B {}
ok(eval('class B {}'));

$ md5 Test.pm
MD5 (Test.pm) = a53345a042f07d942f239830773cea54

$ perl6 nasty-bug
Null PMC access in type()
current instr.​: '_block11' pc 53 (EVAL_12​:19)

As of r36096 this prints​:

not ok 1 -
# Looks like you planned tests, but ran 1
# Looks like you failed 1 tests of 1

Since the type re-declaration is caught at compile time of the eval. In
fact, $! contains a message about the re-declaration of type B.

Thanks!

Jonathan

@p6rt
Copy link
Author

p6rt commented Jan 28, 2009

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

@p6rt
Copy link
Author

p6rt commented Jan 28, 2009

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

@p6rt p6rt closed this as completed Jan 28, 2009
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