[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SIGSEGV problem
From: |
Christian Hopp |
Subject: |
Re: SIGSEGV problem |
Date: |
Thu, 14 Aug 2003 19:10:56 +0200 (CEST) |
On Thu, 14 Aug 2003, Jan-Henrik Haukeland wrote:
>
> I ran a fast test with efence and managed to reproduce the SIGSEGV (it
> may be more). SIGSEGV is thrown in process/common.c:connectchild()
> from this line:
>
> parent->children[parent->children_num - 1] = (struct myprocesstree *) child;
>
>
> >From my gdb/efence session:
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 1024 (LWP 1269)]
> 0x0805b340 in connectchild (parent=0x41143fa0, child=0x41144740)
> at process/common.c:232
>
> (gdb) p *parent->children
> Cannot access memory at address 0x41365fcc
>
> (gdb) p parent->children[parent->children_num - 1]
> Cannot access memory at address 0x41365ffc
>
> I suspect it's caused by trying to access something outside the
> array. Maybe Christian can debug this since it's his code :) I'm of to
> bed, it's late.
Strange... I just had a look at the code... and it IMHO impossible to
access memory which is not allocated at this position!
I do a xcalloc of parent->children_num entities of pointers and it has to
be possible to access the last one (parent->childen_num - 1)... or? Or is
it being deleted while this happens... somekind of race condition???
CHopp
--
Christian Hopp email: address@hidden
Institut für Elektrische Informationstechnik fon: +49-5323-72-2113
TU Clausthal, Leibnizstr. 28, 38678 Clausthal-Zellerf. fax: +49-5323-72-3197
pgpkey: https://www.iei.tu-clausthal.de/pgp-keys/
Re: SIGSEGV problem, Jan-Henrik Haukeland, 2003/08/13