Re: [perl #57338] parrot segfaults after nonexistent method is called from within sub invoked without parens in rakudo

2008-09-11 Thread chromatic
On Thursday 11 September 2008 07:17:56 Carl Mäsak wrote:

> Jonathan (>), Carl (>>):
> >> This also works, but segfaults:
> >>
> >> $ ./perl6 -e 'class A {}; sub c { say A.new.b() }; c'
> >> Method 'b' not found for invocant of class 'A'
> >> current instr.: 'c' pc 99 (EVAL_13:42)
> >> called from Sub '_block11' pc 17 (EVAL_13:11)
> >> 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 14567 (perl6.pir:172)
> >> perl6(27149) malloc: *** error for object 0xcc2e40: double free
> >> *** set a breakpoint in malloc_error_break to debug
> >> Segmentation fault
> >
> > Is this still an issue - I think I saw something to the effect taht the
> > double free had been resolved recently-ish?
>
> Aye, this one still persists.

This backtrace pattern bothers me a lot; I wish I could figure it out:

Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb7b4f8d0 (LWP 29711)]
0xb7f17410 in __kernel_vsyscall ()
(gdb) bt
#0  0xb7f17410 in __kernel_vsyscall ()
#1  0x4810b085 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0x4810ca01 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0x4814e835 in free_check () from /lib/tls/i686/cmov/libc.so.6
#4  0x4814f495 in free () from /lib/tls/i686/cmov/libc.so.6
#5  0xb7cae3c1 in mem_sys_free (from=0x0) at src/gc/memory.c:304
#6  0xb7caeafa in destroy_context (interp=0x81e4008) at src/gc/register.c:163
#7  0xb7cb555b in Parrot_really_destroy (interp=0x81e4008, exit_code_unused=1, 
arg_unused=0x0) at src/inter_create.c:441
#8  0xb7ca8459 in Parrot_exit (interp=0x81e4008, status=1) at src/exit.c:89
#9  0xb7ca7e26 in find_exception_handler (interp=0x81e4008, 
exception=0x4822b864) at src/exceptions.c:149
#10 0xb7ca8095 in Parrot_ex_throw_from_op (interp=0x81e4008, 
exception=0xb772ee3c, dest=0x0) at src/exceptions.c:193
#11 0xb7ca8209 in Parrot_ex_rethrow_from_op (interp=0x81e4008, 
exception=0xb772ee3c) at src/exceptions.c:363
#12 0xb7c7af1f in Parrot_rethrow_p (cur_opcode=0x828d6f4, interp=0x81e4008)
at src/ops/core.ops:832
#13 0xb7ce6bd0 in runops_slow_core (interp=0x81e4008, pc=0x828d6f4)
at src/runops_cores.c:222
#14 0xb7cb6a7f in runops_int (interp=0x81e4008, offset=164)
at src/interpreter.c:937
#15 0xb7cb754d in runops (interp=0x81e4008, offs=164) at src/inter_run.c:101
---Type  to continue, or q  to quit---
#16 0xb7cb7753 in runops_args (interp=0x81e4008, sub=0xb772ef1c, 
obj=0x823cf28, meth_unused=0x0, sig=0xb7e80886 "vPS", 
ap=0xbfb38f5c "<��x�212�<��x�212�-") at src/inter_run.c:236
#17 0xb7cb7d77 in Parrot_runops_fromc_args (interp=0x81e4008, sub=0xb772ef1c, 
sig=0xb7e80886 "vPS") at src/inter_run.c:300
#18 0xb7ca7fcc in Parrot_ex_throw_from_c (interp=0x81e4008, 
exception=0xb772ee3c) at src/exceptions.c:292
#19 0xb7ca8361 in Parrot_ex_throw_from_c_args (interp=0x81e4008, 
ret_addr=0x828d65c, exitcode=45, 
format=0xb7e76018 "Method '%Ss' not found for invocant of class '%Ss'")
at src/exceptions.c:339
#20 0xb7c63a6c in Parrot_callmethodcc_p_sc (cur_opcode=0x828d650, 
interp=0x81e4008) at src/ops/object.ops:71
#21 0xb7ce6bd0 in runops_slow_core (interp=0x81e4008, pc=0x828d650)
at src/runops_cores.c:222
#22 0xb7cb6a7f in runops_int (interp=0x81e4008, offset=3289)
at src/interpreter.c:937
#23 0xb7cb754d in runops (interp=0x81e4008, offs=3289) at src/inter_run.c:101
#24 0xb7cb7753 in runops_args (interp=0x81e4008, sub=0xb73c65e0, 
obj=0x823cf28, meth_unused=0x0, sig=0xb7e80886 "vPS", 
ap=0xbfb3916c "�<��X��<��X�\024") at src/inter_run.c:236
#25 0xb7cb7d77 in Parrot_runops_fromc_args (interp=0x81e4008, sub=0xb73c65e0, 
sig=0xb7e80886 "vPS") at src/inter_run.c:300
---Type  to continue, or q  to quit---
#26 0xb7ca7fcc in Parrot_ex_throw_from_c (interp=0x81e4008, 
exception=0xb73c58c0) at src/exceptions.c:292
#27 0xb7ca8361 in Parrot_ex_throw_from_c_args (interp=0x81e4008, ret_addr=0x0, 
exitcode=20, format=0xb7e82edc "Class %Ss already registered!\n")
at src/exceptions.c:339
#28 0xb7cdec19 in Parrot_oo_register_type (interp=0x81e4008, name=0xb73c620c)
at src/oo.c:624
#29 0xb7e02296 in init_class_from_hash (interp=0x81e4008, self=0xb73c6084, 
info=0xb73c594c) at ./src/pmc/class.pmc:222
#30 0xb7ce620f in pmc_new_init (interp=0x81e4008, base_type=49, 
init=0xb73c620c) at src/pmc.c:368
#31 0xb7c70607 in Parrot_newclass_p_p (cur_opcode=0xb7b67b24, 
interp=0x81e4008)
at src/ops/object.ops:249
#32 0xb7ce6bd0 in runops_slow_core (interp=0x81e4008, pc=0xb7b67b24)
at src/runops_cores.c:222
#33 0xb7cb6a7f in runops_int (interp=0x81e4008, offset=3289)
at src/interpreter.c:937
#34 0xb7cb754d in runops (interp=0x81e4008, offs=3289) at src/inter_run.c:101
#35 0xb7cb7753 in runops_args (interp=0x81e4008, sub=0xb73b40dc, 
obj=0x823cf28, meth_unused=0x0, sig=0xb7e80886 "vPS", 
a

Re: [perl #57338] parrot segfaults after nonexistent method is called from within sub invoked without parens in rakudo

2008-09-11 Thread Carl Mäsak
Jonathan (>), Carl (>>):
>> This also works, but segfaults:
>>
>> $ ./perl6 -e 'class A {}; sub c { say A.new.b() }; c'
>> Method 'b' not found for invocant of class 'A'
>> current instr.: 'c' pc 99 (EVAL_13:42)
>> called from Sub '_block11' pc 17 (EVAL_13:11)
>> 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 14567 (perl6.pir:172)
>> perl6(27149) malloc: *** error for object 0xcc2e40: double free
>> *** set a breakpoint in malloc_error_break to debug
>> Segmentation fault
>
> Is this still an issue - I think I saw something to the effect taht the
> double free had been resolved recently-ish?

Aye, this one still persists.

// Carl


[perl #57338] parrot segfaults after nonexistent method is called from within sub invoked without parens in rakudo

2008-09-11 Thread [EMAIL PROTECTED] via RT
On Sun Jul 27 08:06:04 2008, masak wrote:
> This also works, but segfaults:
> 
> $ ./perl6 -e 'class A {}; sub c { say A.new.b() }; c'
> Method 'b' not found for invocant of class 'A'
> current instr.: 'c' pc 99 (EVAL_13:42)
> called from Sub '_block11' pc 17 (EVAL_13:11)
> 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 14567 (perl6.pir:172)
> perl6(27149) malloc: *** error for object 0xcc2e40: double free
> *** set a breakpoint in malloc_error_break to debug
> Segmentation fault

Is this still an issue - I think I saw something to the effect taht the
double free had been resolved recently-ish?

Thanks,

Jonathan



[perl #57338] parrot segfaults after nonexistent method is called from within sub invoked without parens in rakudo

2008-07-27 Thread Carl Mäsak
# New Ticket Created by  "Carl Mäsak" 
# Please include the string:  [perl #57338]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org/rt3/Ticket/Display.html?id=57338 >


$ svn info | grep Revi
Revision: 29791

This works:

$ ./perl6 -e 'class A {}; say A.new.b()'
Method 'b' not found for invocant of class 'A'
[...]

Even this works!

$ ./perl6 -e 'class A {}; sub c { say A.new.b() }; c()'
Method 'b' not found for invocant of class 'A'
[...]

This also works, but segfaults:

$ ./perl6 -e 'class A {}; sub c { say A.new.b() }; c'
Method 'b' not found for invocant of class 'A'
current instr.: 'c' pc 99 (EVAL_13:42)
called from Sub '_block11' pc 17 (EVAL_13:11)
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 14567 (perl6.pir:172)
perl6(27149) malloc: *** error for object 0xcc2e40: double free
*** set a breakpoint in malloc_error_break to debug
Segmentation fault