On Fri, Mar 11, 2005 at 06:11:25PM +0100, Leopold Toetsch wrote: > Peter Sinnott wrote:
> Can someone run this through valgrind or some other memory debugger please. I'm not sure if this test is the one you want. The fun output is near the end. $ valgrind ./parrot --gc-debug "/home/nick/Parrot/parrot00/t/dynclass/foo_1.imc" ==30839== Memcheck, a memory error detector for x86-linux. ==30839== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward et al. ==30839== Using valgrind-2.2.0, a program supervision framework for x86-linux. ==30839== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward et al. ==30839== For more details, rerun with: -v ==30839== ==30839== warning: Valgrind's pthread_attr_destroy does nothing ==30839== your program may misbehave as a result ==30839== warning: Valgrind's pthread_attr_destroy does nothing ==30839== your program may misbehave as a result ==30839== Conditional jump or move depends on uninitialised value(s) ==30839== at 0x80DD60E: trace_mem_block (dod.c:994) ==30839== by 0x80DF933: trace_system_stack (cpu_dep.c:117) ==30839== by 0x80DF901: trace_system_areas (cpu_dep.c:98) ==30839== by 0x80DCF1A: Parrot_dod_trace_root (dod.c:362) ==30839== ==30839== Conditional jump or move depends on uninitialised value(s) ==30839== at 0x80DD61C: trace_mem_block (dod.c:999) ==30839== by 0x80DF933: trace_system_stack (cpu_dep.c:117) ==30839== by 0x80DF901: trace_system_areas (cpu_dep.c:98) ==30839== by 0x80DCF1A: Parrot_dod_trace_root (dod.c:362) ==30839== ==30839== Conditional jump or move depends on uninitialised value(s) ==30839== at 0x80DD654: trace_mem_block (dod.c:1006) ==30839== by 0x80DF933: trace_system_stack (cpu_dep.c:117) ==30839== by 0x80DF901: trace_system_areas (cpu_dep.c:98) ==30839== by 0x80DCF1A: Parrot_dod_trace_root (dod.c:362) ==30839== ==30839== Conditional jump or move depends on uninitialised value(s) ==30839== at 0x80DD624: trace_mem_block (dod.c:999) ==30839== by 0x80DF933: trace_system_stack (cpu_dep.c:117) ==30839== by 0x80DF901: trace_system_areas (cpu_dep.c:98) ==30839== by 0x80DCF1A: Parrot_dod_trace_root (dod.c:362) ==30839== ==30839== Conditional jump or move depends on uninitialised value(s) ==30839== at 0x80DB958: contained_in_pool (smallobject.c:55) ==30839== by 0x80DC6EC: is_pmc_ptr (headers.c:540) ==30839== by 0x80DD633: trace_mem_block (dod.c:999) ==30839== by 0x80DF933: trace_system_stack (cpu_dep.c:117) ==30839== ==30839== Conditional jump or move depends on uninitialised value(s) ==30839== at 0x80DB969: contained_in_pool (smallobject.c:55) ==30839== by 0x80DC6EC: is_pmc_ptr (headers.c:540) ==30839== by 0x80DD633: trace_mem_block (dod.c:999) ==30839== by 0x80DF933: trace_system_stack (cpu_dep.c:117) ==30839== ==30839== Conditional jump or move depends on uninitialised value(s) ==30839== at 0x80DB986: contained_in_pool (smallobject.c:55) ==30839== by 0x80DC6EC: is_pmc_ptr (headers.c:540) ==30839== by 0x80DD633: trace_mem_block (dod.c:999) ==30839== by 0x80DF933: trace_system_stack (cpu_dep.c:117) ==30839== ==30839== Use of uninitialised value of size 4 ==30839== at 0x80DCC49: pobject_lives (dod.c:196) ==30839== by 0x80DD648: trace_mem_block (dod.c:1004) ==30839== by 0x80DF933: trace_system_stack (cpu_dep.c:117) ==30839== by 0x80DF901: trace_system_areas (cpu_dep.c:98) ==30839== ==30839== Conditional jump or move depends on uninitialised value(s) ==30839== at 0x80DD65C: trace_mem_block (dod.c:1006) ==30839== by 0x80DF933: trace_system_stack (cpu_dep.c:117) ==30839== by 0x80DF901: trace_system_areas (cpu_dep.c:98) ==30839== by 0x80DCF1A: Parrot_dod_trace_root (dod.c:362) ==30839== ==30839== Conditional jump or move depends on uninitialised value(s) ==30839== at 0x80DB958: contained_in_pool (smallobject.c:55) ==30839== by 0x80DC642: is_buffer_ptr (headers.c:512) ==30839== by 0x80DD66B: trace_mem_block (dod.c:1006) ==30839== by 0x80DF933: trace_system_stack (cpu_dep.c:117) ==30839== ==30839== Conditional jump or move depends on uninitialised value(s) ==30839== at 0x80DB969: contained_in_pool (smallobject.c:55) ==30839== by 0x80DC642: is_buffer_ptr (headers.c:512) ==30839== by 0x80DD66B: trace_mem_block (dod.c:1006) ==30839== by 0x80DF933: trace_system_stack (cpu_dep.c:117) ==30839== ==30839== Conditional jump or move depends on uninitialised value(s) ==30839== at 0x80DB958: contained_in_pool (smallobject.c:55) ==30839== by 0x80DC69D: is_buffer_ptr (headers.c:517) ==30839== by 0x80DD66B: trace_mem_block (dod.c:1006) ==30839== by 0x80DF933: trace_system_stack (cpu_dep.c:117) ==30839== ==30839== Conditional jump or move depends on uninitialised value(s) ==30839== at 0x80DB969: contained_in_pool (smallobject.c:55) ==30839== by 0x80DC69D: is_buffer_ptr (headers.c:517) ==30839== by 0x80DD66B: trace_mem_block (dod.c:1006) ==30839== by 0x80DF933: trace_system_stack (cpu_dep.c:117) ==30839== ==30839== Conditional jump or move depends on uninitialised value(s) ==30839== at 0x80DB986: contained_in_pool (smallobject.c:55) ==30839== by 0x80DC642: is_buffer_ptr (headers.c:512) ==30839== by 0x80DD66B: trace_mem_block (dod.c:1006) ==30839== by 0x80DF933: trace_system_stack (cpu_dep.c:117) ==30839== ==30839== Use of uninitialised value of size 4 ==30839== at 0x80DCC49: pobject_lives (dod.c:196) ==30839== by 0x80DD680: trace_mem_block (dod.c:1010) ==30839== by 0x80DF933: trace_system_stack (cpu_dep.c:117) ==30839== by 0x80DF901: trace_system_areas (cpu_dep.c:98) ==30839== ==30839== Use of uninitialised value of size 4 ==30839== at 0x80DCC5D: pobject_lives (dod.c:210) ==30839== by 0x80DD680: trace_mem_block (dod.c:1010) ==30839== by 0x80DF933: trace_system_stack (cpu_dep.c:117) ==30839== by 0x80DF901: trace_system_areas (cpu_dep.c:98) ==30839== ==30839== Use of uninitialised value of size 4 ==30839== at 0x80DCC65: pobject_lives (dod.c:210) ==30839== by 0x80DD680: trace_mem_block (dod.c:1010) ==30839== by 0x80DF933: trace_system_stack (cpu_dep.c:117) ==30839== by 0x80DF901: trace_system_areas (cpu_dep.c:98) ==30839== ==30839== Use of uninitialised value of size 4 ==30839== at 0x80DCC6B: pobject_lives (dod.c:215) ==30839== by 0x80DD680: trace_mem_block (dod.c:1010) ==30839== by 0x80DF933: trace_system_stack (cpu_dep.c:117) ==30839== by 0x80DF901: trace_system_areas (cpu_dep.c:98) ==30839== ==30839== Conditional jump or move depends on uninitialised value(s) ==30839== at 0x81E67EC: Parrot_SArray_mark (sarray.c:275) ==30839== by 0x80DD135: Parrot_dod_trace_children (dod.c:460) ==30839== by 0x80DCF90: trace_active_PMCs (dod.c:378) ==30839== by 0x80DD919: Parrot_dod_ms_run (dod.c:1200) ==30839== ==30839== Use of uninitialised value of size 4 ==30839== at 0x80DCC49: pobject_lives (dod.c:196) ==30839== by 0x81E67FE: Parrot_SArray_mark (sarray.c:276) ==30839== by 0x80DD135: Parrot_dod_trace_children (dod.c:460) ==30839== by 0x80DCF90: trace_active_PMCs (dod.c:378) ==30839== ==30839== Use of uninitialised value of size 4 ==30839== at 0x80DCC5D: pobject_lives (dod.c:210) ==30839== by 0x81E67FE: Parrot_SArray_mark (sarray.c:276) ==30839== by 0x80DD135: Parrot_dod_trace_children (dod.c:460) ==30839== by 0x80DCF90: trace_active_PMCs (dod.c:378) ==30839== ==30839== Use of uninitialised value of size 4 ==30839== at 0x80DCC65: pobject_lives (dod.c:210) ==30839== by 0x81E67FE: Parrot_SArray_mark (sarray.c:276) ==30839== by 0x80DD135: Parrot_dod_trace_children (dod.c:460) ==30839== by 0x80DCF90: trace_active_PMCs (dod.c:378) ==30839== ==30839== Use of uninitialised value of size 4 ==30839== at 0x80DCC6B: pobject_lives (dod.c:215) ==30839== by 0x81E67FE: Parrot_SArray_mark (sarray.c:276) ==30839== by 0x80DD135: Parrot_dod_trace_children (dod.c:460) ==30839== by 0x80DCF90: trace_active_PMCs (dod.c:378) ==30839== ==30839== Invalid read of size 1 ==30839== at 0x1B904AE0: memcpy (mac_replace_strmem.c:285) ==30839== by 0x80E36D2: mmd_expand_x (mmd.c:430) ==30839== by 0x80E389C: mmd_register (mmd.c:578) ==30839== by 0x80A9C5B: Parrot_mmd_register_parents (pmc.c:504) ==30839== Address 0x1C4CE5E7 is 1 bytes before a block of size 21904 alloc'd ==30839== at 0x1B904EDD: malloc (vg_replace_malloc.c:131) ==30839== by 0x809E240: mem_sys_allocate (memory.c:43) ==30839== by 0x80E375C: mmd_expand_y (mmd.c:468) ==30839== by 0x80E38BD: mmd_register (mmd.c:582) ==30839== ==30839== Invalid read of size 1 ==30839== at 0x1B904AEA: memcpy (mac_replace_strmem.c:286) ==30839== by 0x80E36D2: mmd_expand_x (mmd.c:430) ==30839== by 0x80E389C: mmd_register (mmd.c:578) ==30839== by 0x80A9C5B: Parrot_mmd_register_parents (pmc.c:504) ==30839== Address 0x1C4CE5E6 is 2 bytes before a block of size 21904 alloc'd ==30839== at 0x1B904EDD: malloc (vg_replace_malloc.c:131) ==30839== by 0x809E240: mem_sys_allocate (memory.c:43) ==30839== by 0x80E375C: mmd_expand_y (mmd.c:468) ==30839== by 0x80E38BD: mmd_register (mmd.c:582) ==30839== ==30839== Invalid read of size 1 ==30839== at 0x1B904AF1: memcpy (mac_replace_strmem.c:287) ==30839== by 0x80E36D2: mmd_expand_x (mmd.c:430) ==30839== by 0x80E389C: mmd_register (mmd.c:578) ==30839== by 0x80A9C5B: Parrot_mmd_register_parents (pmc.c:504) ==30839== Address 0x1C4CE5E5 is 3 bytes before a block of size 21904 alloc'd ==30839== at 0x1B904EDD: malloc (vg_replace_malloc.c:131) ==30839== by 0x809E240: mem_sys_allocate (memory.c:43) ==30839== by 0x80E375C: mmd_expand_y (mmd.c:468) ==30839== by 0x80E38BD: mmd_register (mmd.c:582) ==30839== ==30839== Invalid read of size 1 ==30839== at 0x1B904AF8: memcpy (mac_replace_strmem.c:288) ==30839== by 0x80E36D2: mmd_expand_x (mmd.c:430) ==30839== by 0x80E389C: mmd_register (mmd.c:578) ==30839== by 0x80A9C5B: Parrot_mmd_register_parents (pmc.c:504) ==30839== Address 0x1C4CE5E4 is 4 bytes before a block of size 21904 alloc'd ==30839== at 0x1B904EDD: malloc (vg_replace_malloc.c:131) ==30839== by 0x809E240: mem_sys_allocate (memory.c:43) ==30839== by 0x80E375C: mmd_expand_y (mmd.c:468) ==30839== by 0x80E38BD: mmd_register (mmd.c:582) ==30839== ==30839== Process terminating with default action of signal 11 (SIGSEGV) ==30839== Access not within mapped region at address 0x1C5C90BF ==30839== at 0x1B904AE0: memcpy (mac_replace_strmem.c:285) ==30839== by 0x80E36D2: mmd_expand_x (mmd.c:430) ==30839== by 0x80E389C: mmd_register (mmd.c:578) ==30839== by 0x80A9C5B: Parrot_mmd_register_parents (pmc.c:504) ==30839== ==30839== ERROR SUMMARY: 15977 errors from 27 contexts (suppressed: 31 from 1) ==30839== malloc/free: in use at exit: 81418001 bytes in 2142 blocks. ==30839== malloc/free: 2320 allocs, 178 frees, 83183573 bytes allocated. ==30839== For a detailed leak analysis, rerun with: --leak-check=yes ==30839== For counts of detected errors, rerun with: -v Segmentation fault The process runs, then there's a pause, then there's more output leading to the SEGV. After the pause, the output (with lots more callers) is: ==30847== ==30847== Invalid read of size 1 ==30847== at 0x1B904AE0: memcpy (mac_replace_strmem.c:285) ==30847== by 0x80E36D2: mmd_expand_x (mmd.c:430) ==30847== by 0x80E389C: mmd_register (mmd.c:578) ==30847== by 0x80A9C5B: Parrot_mmd_register_parents (pmc.c:504) ==30847== by 0x1C8D8725: Parrot_Foo_class_init (foo.c:328) ==30847== by 0x1C8D87A4: Parrot_lib_foo_load (foo.c:362) ==30847== by 0x80E21DD: Parrot_init_lib (dynext.c:258) ==30847== by 0x80E2343: Parrot_load_lib (dynext.c:322) ==30847== by 0x80F8AF5: Parrot_loadlib_p_sc (core.ops:1149) ==30847== by 0x816614B: runops_slow_core (runops_cores.c:147) ==30847== by 0x8164627: runops_int (interpreter.c:742) ==30847== by 0x8165474: runops (inter_run.c:81) ==30847== by 0x80D6B73: Parrot_runcode (embed.c:768) ==30847== by 0x80D69B1: Parrot_runcode (embed.c:700) ==30847== by 0x809D040: main (main.c:603) ==30847== Address 0x1C4CE5E7 is 1 bytes before a block of size 21904 alloc'd ==30847== at 0x1B904EDD: malloc (vg_replace_malloc.c:131) ==30847== by 0x809E240: mem_sys_allocate (memory.c:43) ==30847== by 0x80E375C: mmd_expand_y (mmd.c:468) ==30847== by 0x80E38BD: mmd_register (mmd.c:582) ==30847== by 0x80A9C5B: Parrot_mmd_register_parents (pmc.c:504) ==30847== by 0x81F67A7: Parrot_Undef_class_init (undef.c:433) ==30847== by 0x8168AD8: Parrot_initialize_core_pmcs (core_pmcs.c:92) ==30847== by 0x8163842: init_world (global_setup.c:71) ==30847== by 0x80D5D69: Parrot_init (embed.c:84) ==30847== by 0x809D250: make_interpreter (inter_create.c:156) ==30847== by 0x80D5D32: Parrot_new (embed.c:47) ==30847== by 0x809C880: main (main.c:416) ==30847== ==30847== Invalid read of size 1 ==30847== at 0x1B904AEA: memcpy (mac_replace_strmem.c:286) ==30847== by 0x80E36D2: mmd_expand_x (mmd.c:430) ==30847== by 0x80E389C: mmd_register (mmd.c:578) ==30847== by 0x80A9C5B: Parrot_mmd_register_parents (pmc.c:504) ==30847== by 0x1C8D8725: Parrot_Foo_class_init (foo.c:328) ==30847== by 0x1C8D87A4: Parrot_lib_foo_load (foo.c:362) ==30847== by 0x80E21DD: Parrot_init_lib (dynext.c:258) ==30847== by 0x80E2343: Parrot_load_lib (dynext.c:322) ==30847== by 0x80F8AF5: Parrot_loadlib_p_sc (core.ops:1149) ==30847== by 0x816614B: runops_slow_core (runops_cores.c:147) ==30847== by 0x8164627: runops_int (interpreter.c:742) ==30847== by 0x8165474: runops (inter_run.c:81) ==30847== by 0x80D6B73: Parrot_runcode (embed.c:768) ==30847== by 0x80D69B1: Parrot_runcode (embed.c:700) ==30847== by 0x809D040: main (main.c:603) ==30847== Address 0x1C4CE5E6 is 2 bytes before a block of size 21904 alloc'd ==30847== at 0x1B904EDD: malloc (vg_replace_malloc.c:131) ==30847== by 0x809E240: mem_sys_allocate (memory.c:43) ==30847== by 0x80E375C: mmd_expand_y (mmd.c:468) ==30847== by 0x80E38BD: mmd_register (mmd.c:582) ==30847== by 0x80A9C5B: Parrot_mmd_register_parents (pmc.c:504) ==30847== by 0x81F67A7: Parrot_Undef_class_init (undef.c:433) ==30847== by 0x8168AD8: Parrot_initialize_core_pmcs (core_pmcs.c:92) ==30847== by 0x8163842: init_world (global_setup.c:71) ==30847== by 0x80D5D69: Parrot_init (embed.c:84) ==30847== by 0x809D250: make_interpreter (inter_create.c:156) ==30847== by 0x80D5D32: Parrot_new (embed.c:47) ==30847== by 0x809C880: main (main.c:416) ==30847== ==30847== Invalid read of size 1 ==30847== at 0x1B904AF1: memcpy (mac_replace_strmem.c:287) ==30847== by 0x80E36D2: mmd_expand_x (mmd.c:430) ==30847== by 0x80E389C: mmd_register (mmd.c:578) ==30847== by 0x80A9C5B: Parrot_mmd_register_parents (pmc.c:504) ==30847== by 0x1C8D8725: Parrot_Foo_class_init (foo.c:328) ==30847== by 0x1C8D87A4: Parrot_lib_foo_load (foo.c:362) ==30847== by 0x80E21DD: Parrot_init_lib (dynext.c:258) ==30847== by 0x80E2343: Parrot_load_lib (dynext.c:322) ==30847== by 0x80F8AF5: Parrot_loadlib_p_sc (core.ops:1149) ==30847== by 0x816614B: runops_slow_core (runops_cores.c:147) ==30847== by 0x8164627: runops_int (interpreter.c:742) ==30847== by 0x8165474: runops (inter_run.c:81) ==30847== by 0x80D6B73: Parrot_runcode (embed.c:768) ==30847== by 0x80D69B1: Parrot_runcode (embed.c:700) ==30847== by 0x809D040: main (main.c:603) ==30847== Address 0x1C4CE5E5 is 3 bytes before a block of size 21904 alloc'd ==30847== at 0x1B904EDD: malloc (vg_replace_malloc.c:131) ==30847== by 0x809E240: mem_sys_allocate (memory.c:43) ==30847== by 0x80E375C: mmd_expand_y (mmd.c:468) ==30847== by 0x80E38BD: mmd_register (mmd.c:582) ==30847== by 0x80A9C5B: Parrot_mmd_register_parents (pmc.c:504) ==30847== by 0x81F67A7: Parrot_Undef_class_init (undef.c:433) ==30847== by 0x8168AD8: Parrot_initialize_core_pmcs (core_pmcs.c:92) ==30847== by 0x8163842: init_world (global_setup.c:71) ==30847== by 0x80D5D69: Parrot_init (embed.c:84) ==30847== by 0x809D250: make_interpreter (inter_create.c:156) ==30847== by 0x80D5D32: Parrot_new (embed.c:47) ==30847== by 0x809C880: main (main.c:416) ==30847== ==30847== Invalid read of size 1 ==30847== at 0x1B904AF8: memcpy (mac_replace_strmem.c:288) ==30847== by 0x80E36D2: mmd_expand_x (mmd.c:430) ==30847== by 0x80E389C: mmd_register (mmd.c:578) ==30847== by 0x80A9C5B: Parrot_mmd_register_parents (pmc.c:504) ==30847== by 0x1C8D8725: Parrot_Foo_class_init (foo.c:328) ==30847== by 0x1C8D87A4: Parrot_lib_foo_load (foo.c:362) ==30847== by 0x80E21DD: Parrot_init_lib (dynext.c:258) ==30847== by 0x80E2343: Parrot_load_lib (dynext.c:322) ==30847== by 0x80F8AF5: Parrot_loadlib_p_sc (core.ops:1149) ==30847== by 0x816614B: runops_slow_core (runops_cores.c:147) ==30847== by 0x8164627: runops_int (interpreter.c:742) ==30847== by 0x8165474: runops (inter_run.c:81) ==30847== by 0x80D6B73: Parrot_runcode (embed.c:768) ==30847== by 0x80D69B1: Parrot_runcode (embed.c:700) ==30847== by 0x809D040: main (main.c:603) ==30847== Address 0x1C4CE5E4 is 4 bytes before a block of size 21904 alloc'd ==30847== at 0x1B904EDD: malloc (vg_replace_malloc.c:131) ==30847== by 0x809E240: mem_sys_allocate (memory.c:43) ==30847== by 0x80E375C: mmd_expand_y (mmd.c:468) ==30847== by 0x80E38BD: mmd_register (mmd.c:582) ==30847== by 0x80A9C5B: Parrot_mmd_register_parents (pmc.c:504) ==30847== by 0x81F67A7: Parrot_Undef_class_init (undef.c:433) ==30847== by 0x8168AD8: Parrot_initialize_core_pmcs (core_pmcs.c:92) ==30847== by 0x8163842: init_world (global_setup.c:71) ==30847== by 0x80D5D69: Parrot_init (embed.c:84) ==30847== by 0x809D250: make_interpreter (inter_create.c:156) ==30847== by 0x80D5D32: Parrot_new (embed.c:47) ==30847== by 0x809C880: main (main.c:416) ==30847== ==30847== Process terminating with default action of signal 11 (SIGSEGV) ==30847== Access not within mapped region at address 0x1C5C90BF ==30847== at 0x1B904AE0: memcpy (mac_replace_strmem.c:285) ==30847== by 0x80E36D2: mmd_expand_x (mmd.c:430) ==30847== by 0x80E389C: mmd_register (mmd.c:578) ==30847== by 0x80A9C5B: Parrot_mmd_register_parents (pmc.c:504) ==30847== by 0x1C8D8725: Parrot_Foo_class_init (foo.c:328) ==30847== by 0x1C8D87A4: Parrot_lib_foo_load (foo.c:362) ==30847== by 0x80E21DD: Parrot_init_lib (dynext.c:258) ==30847== by 0x80E2343: Parrot_load_lib (dynext.c:322) ==30847== by 0x80F8AF5: Parrot_loadlib_p_sc (core.ops:1149) ==30847== by 0x816614B: runops_slow_core (runops_cores.c:147) ==30847== by 0x8164627: runops_int (interpreter.c:742) ==30847== by 0x8165474: runops (inter_run.c:81) ==30847== by 0x80D6B73: Parrot_runcode (embed.c:768) ==30847== by 0x80D69B1: Parrot_runcode (embed.c:700) ==30847== by 0x809D040: main (main.c:603) ==30847== I'm not sure what to do next. Nicholas Clark