Re: Segfault in extend.c/ parrot_pmc_get_pointer

[email protected] (Arthur Bergman)
Newsgroups perl.perl6.internals,perl.ponie.dev
Message-ID <[email protected]>
On Monday, December 15, 2003, at 12:58  pm, Leopold Toetsch wrote:

> Arthur Bergman <[email protected]> wrote:
>
>> #0  0x081cef45 in Parrot_PMC_get_pointer (interp=0x82d7f78,
>> pmc=0x83333a0)
>
> That looks like the vtable could be corrupted.
> $ p *pmc
> $ p *pmc->vtable
>


So, after a couple of days struggling to find a lost off64_t I am able 
to try again, (plus side is, I now build a threaded perl to make it 
work (otherwise nasty IO problems hit me)).

So the result.

Most likely,

(gdb) p *pmc
$2 = {obj = {u = {b = {bufstart = 0x4212dfd8, buflen = 137797904}, ptrs 
= {_struct_val = 0x4212dfd8, _pmc_val = 0x836a110},
       int_val = 1108533208, num_val = 4.2834352799906154e-269, 
string_val = 0x4212dfd8}, flags = 1886221358, pobj_version = 0}, vtable 
= 0x18,
   pmc_ext = 0x10}

Of course followed by a

(gdb) p *pmc->vtable
Cannot access memory at address 0x18


If it wasn't for pobj_version = 0 I would suggest it was all just 
random memory I was looking at.

>> Any suggestions?
>
> Maybe the PMC got destroyed by a DOD run. You can check that by
> disabling DOD after Parrot_new(). (Parrot has a commandline option -G
> for this). Also the pmc's flags should reflect that.
>

I doubt this happens since I never give parrot a chance to do anything, 
there is no step that I call into parrot, just

     PL_Parrot = Parrot_new(0);
     Parrot_init(PL_Parrot);

then a bit later


    Parrot_Int  type = Parrot_PMC_typenum(PL_Parrot, "Perl5LV");
    Parrot_PMC_get_pointer(PL_Parrot, SvANY(sv));


Arthur
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.