From: "Leopold Toetsch" <[EMAIL PROTECTED]>
Sent: Monday, December 01, 2003 5:47 PM

>Which child interpreter? Parrot_destroy_vtable() is called after
>free_unused_pobjects().

Okay. I'll try to reword the problem all over again.

Well you know test 61 in t/pmc/pmc.t causes a segfault. To get things
more clear, I'll just simplify the code of test 61 and only extract the
problematic place.

new P0, .ParrotInterpreter
end

At the current time being, the above code ends up with the segfault on
Win32.

When I refered to a child interpreter, I meant the interpreter being
created by the new opcode.

Now I'll outline you some apprx. addresses I have:

For the parent(0x002f3c88) interpreter:

 (*(*(*interpreter).arena_base).pmc_pool).start_arena_memory 0x002fb7f0
 (*(*(*interpreter).arena_base).pmc_pool).end_arena_memory 0x002fe7f0

 (*(*(*interpreter).arena_base).pmc_ext_pool).start_arena_memory 0x00531f80
 (*(*(*interpreter).arena_base).pmc_ext_pool).end_arena_memory 0x00535f80

For the child(0x00544a90) interpreter:

 (*(*(*new_interp).arena_base).pmc_pool).start_arena_memory 0x00565c90
 (*(*(*new_interp).arena_base).pmc_pool).end_arena_memory 0x00568c90

    (*(*(*new_interp).arena_base).pmc_ext_pool).start_arena_memory
0x00568ce0
 (*(*(*new_interp).arena_base).pmc_ext_pool).end_arena_memory 0x0056cce0

Before the segfault happens:

    Parrot_base_vtables[0x28] 0x0053cbb0
 (*(Parrot_base_vtables[0x28])).base_type 0x00000028 (SArray)
 (*(Parrot_base_vtables[0x28])).destroy 0x0049a2b0
Parrot_SArray_destroy(Parrot_Interp *, PMC *)

When segfault happens:

    (PMC *)b 0x002fdc80
    (*((PMC *)b)).vtable 0x0053cbb0
    (*((PMC *)b)).pmc_ext 0x00535ab0

    Parrot_base_vtables[0x28] 0x0053cbb0
    (*(Parrot_base_vtables[0x28])).base_type CXX0030: Error: expression
cannot be evaluated
 (*(Parrot_base_vtables[0x28])).destroy CXX0030: Error: expression cannot be
evaluated

So a big question raises up: Do interpreter share the same copy of
Parrot_base_vtables? Though I know the answer -- they do.

Now if you consider the following LIFO queue of parrot_on_exit registered
functions

Parrot_really_destroy(int 0x00000000, void * 0x00544a90) line 953
print_profile(int 0x00000000, void * 0x002f3c88) line 375
print_debug(int 0x00000000, void * 0x002f3c88) line 433
Parrot_really_destroy(int 0x00000000, void * 0x002f3c88) line 953

the bug will get as clear as ... I'm out of english words!

I'm done with it for now and I'm not the dan to say which way is the parrot
way to fix this bug

0x4C56



Reply via email to