On Sun Jun 03 20:33:35 2007, [EMAIL PROTECTED] wrote: > On Saturday 28 April 2007 16:43:06 Mehmet Yavuz Selim Soyturk wrote: > > > Next program makes a slurpy tailcall, and it causes a memory leak > for me. > > Confirmed. Interestingly, the problem looks like a Key PMC somewhere > gets > garbage collected inappropriately. > > I tried various tricks to mark the call_state's PMC as live, but > nothing fixed > anything except for this patch, which hides the problem. > > Now I know that storing a PMC in a data structure that the GC doesn't > check > during mark and sweep is a problem, but liberal use of > parrot_register_pmc() > didn't fix things either. > > -- c >
This code is segfaulting now (r21166) Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0xdeadbef3 0x00010b42 in clone_key_arg (interp=0x31003b0, st=0xbfffef3c) at src/inter_call.c:641 641 if (key && key->vtable->base_type == enum_class_Key) { (gdb) bt #0 0x00010b42 in clone_key_arg (interp=0x31003b0, st=0xbfffef3c) at src/inter_call.c:641 #1 0x00011d06 in Parrot_convert_arg (interp=0x31003b0, st=0xbfffef3c) at src/inter_call.c: 1104 #2 0x00011a69 in Parrot_process_args (interp=0x31003b0, st=0xbfffef3c, param_or_result=PARROT_PASS_PARAMS) at src/inter_call.c:1036 #3 0x00011e82 in parrot_pass_args (interp=0x31003b0, src_ctx=0x3115010, dest_ctx=0x3111c50, src_indexes=0x311d46c, dest_indexes=0x311d420, param_or_result=PARROT_PASS_PARAMS) at src/inter_call.c:1169 #4 0x000345e0 in Parrot_get_params_pc (cur_opcode=0x311d420, interp=0x31003b0) at src/ops/core.ops:542 #5 0x000e575e in runops_slow_core (interp=0x31003b0, pc=0x311d420) at src/ runops_cores.c:191 #6 0x000c60c3 in runops_int (interp=0x31003b0, offset=29) at src/interpreter.c:818 #7 0x000146a6 in runops (interp=0x31003b0, offs=29) at src/inter_run.c:99 #8 0x00014948 in runops_args (interp=0x31003b0, sub=0x1889e58, obj=0x282dc60, meth_unused=0x0, sig=0x23a490 "vP", ap=0xbffff19c "@~^~H\001?I\021\003L?\n") at src/ inter_run.c:213 #9 0x00014a88 in Parrot_runops_fromc_args (interp=0x31003b0, sub=0x1889e58, sig=0x23a490 "vP") at src/inter_run.c:290 #10 0x0000867f in Parrot_runcode (interp=0x31003b0, argc=1, argv=0xbffff2f4) at src/ embed.c:790 #11 0x000af44c in imcc_run_pbc (interp=0x31003b0, obj_file=0, output_file=0x0, argc=1, argv=0xbffff2f4) at compilers/imcc/main.c:627 #12 0x000afed7 in imcc_run (interp=0x31003b0, sourcefile=0xbffff3a3 "foo.pir", argc=1, argv=0xbffff2f4) at compilers/imcc/main.c:853 #13 0x0000244e in main (argc=1, argv=0xbffff2f4) at src/main.c:60