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

Actually assigning to a read-only variable in rakudo causes parrot to segfault #202

Closed
p6rt opened this issue Jul 30, 2008 · 5 comments
Closed

Comments

@p6rt
Copy link

p6rt commented Jul 30, 2008

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

Searchable as RT57398$

@p6rt
Copy link
Author

p6rt commented Jul 30, 2008

From @masak

$ svn info | grep Revi
Revision​: 29869

$ ./perl6 -e 'sub a($x) { $x = 5 }; my $y = 7; a($y);'
Cannot assign to readonly variable
[...]

works, but the following works but segfaults​:

$ ./perl6 -e 'sub a($x) { $x = 5 }; my $y = 7; a($y);'
Cannot assign to readonly variable
current instr.​: 'a' pc 138 (EVAL_14​:59)
called from Sub '_block11' pc 45 (EVAL_14​:20)
called from Sub 'parrot;PCT​::HLLCompiler;eval' pc 806
(src/PCT/HLLCompiler.pir​:481)
called from Sub 'parrot;PCT​::HLLCompiler;command_line' pc 1305
(src/PCT/HLLCompiler.pir​:708)
called from Sub 'parrot;Perl6​::Compiler;main' pc 14623 (perl6.pir​:172)
perl6(33762) malloc​: *** error for object 0x29c1250​: double free
*** set a breakpoint in malloc_error_break to debug
Segmentation fault

@p6rt
Copy link
Author

p6rt commented Aug 7, 2008

From @masak

jonathan++ pointed out that the two examples here are identical. The
second one should be

$ ./perl6 -e 'sub a($x) { $x = 5 }; a(7)'

which segfaults as described.

@p6rt
Copy link
Author

p6rt commented Feb 25, 2009

From @jnthn

On Tue Jul 29 21​:49​:31 2008, masak wrote​:

$ svn info | grep Revi
Revision​: 29869

$ ./perl6 -e 'sub a($x) { $x = 5 }; my $y = 7; a($y);'
Cannot assign to readonly variable
[...]

works, but the following works but segfaults​:

$ ./perl6 -e 'sub a($x) { $x = 5 }; my $y = 7; a($y);'
Cannot assign to readonly variable
current instr.​: 'a' pc 138 (EVAL_14​:59)
called from Sub '_block11' pc 45 (EVAL_14​:20)
called from Sub 'parrot;PCT​::HLLCompiler;eval' pc 806
(src/PCT/HLLCompiler.pir​:481)
called from Sub 'parrot;PCT​::HLLCompiler;command_line' pc 1305
(src/PCT/HLLCompiler.pir​:708)
called from Sub 'parrot;Perl6​::Compiler;main' pc 14623 (perl6.pir​:172)
perl6(33762) malloc​: *** error for object 0x29c1250​: double free
*** set a breakpoint in malloc_error_break to debug
Segmentation fault

A patch today is believed to have resolved the double frees, so this
should no longer segfault, and it already gives a good enough error, so
resolving ticket.

Thanks,

Jonathan

@p6rt
Copy link
Author

p6rt commented Feb 25, 2009

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

@p6rt
Copy link
Author

p6rt commented Feb 25, 2009

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

@p6rt p6rt closed this as completed Feb 25, 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