On Monday 27 October 2008 09:15:29 Will Coleda wrote:

> > While trying to duplicate the tcl segfault in PIR, I was able to
> > generate PIR that reliably segfaulted; except it turned out it was
> > segfaulting a different way:
> >
> > .sub '__onload' :immediate
> >    load_bytecode 'TGE.pbc'
> >    push_eh class_loaded
> >        $P1 = subclass  [ 'TGE'; 'Grammar' ],  ['what']
> >    pop_eh
> >  class_loaded:
> > .end
> >
> > #0  0xb7e74958 in verify_signature (interp=0x804f040, ins=0x81ce4a8,
> >    pc=0x81ce590) at compilers/imcc/pbc.c:1734
> > #1  0xb7e752d2 in e_pbc_emit (interp=0x804f040, param_unused=0x0,
> >    unit=0x81cdf08, ins=0x81ce4a8) at compilers/imcc/pbc.c:1998
> > #2  0xb7e69726 in emit_flush (interp=0x804f040, param=0x0,
> > unit=0x81cdf08) at compilers/imcc/instructions.c:879
> > ...
> >
> > This segfault doesn't is still present with -G

It has nothing to do with garbage collection.

> FYI, this appears in trunk in r32194.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7a118d0 (LWP 11195)]
0xb7e78f3a in e_pbc_emit (interp=0x804f040, param_unused=0x0, unit=0x81d5ff0, 
    ins=0x81d65b0) at compilers/imcc/pbc.c:1734
1734        PMC    * const sig_arr = 
interp->code->const_table->constants[pc[-1]]->u.key;
(gdb) p *(pc - 1)
$4 = 5
(gdb) p *(pc)
$5 = 0
(gdb) p interp->code->const_table->constants[5]
$6 = (PackFile_Constant *) 0x61

I don't know what this means yet, but clearly there aren't enough constants in 
this code segment to find the signature there.

-- c

Reply via email to