On Wed, Jan 09, 2019 at 09:42:43PM +0100, Andreas Tille wrote: > to find the exact code line[2] where the SIGSEGV is thrown. It turns out > that the elements of a structure are not accessible: > > (gdb) print entry->offset > Cannot access memory at address 0x7 It's because entry is 0x7.
> In fact I tried in some more detailed debugging that any attempt to > access one of the structure elements even for instance only injecting > something like > > if ( !entry->offset ) { Of course this won't work, entry is 0x7. > The values of the structure are set in line 350[3] and are OK there. The problem is not about the structure fields but about the structure pointer itself though. > The funktion that contains the failing line is action() [4] and called > via a pointer to this function in line 563[5] (I admit I have no real > idea why this pointer to a function should be needed. Its the only > function that is used in this place and IMHO only adds an extra layer of > complexity.) No? line 563 calls twalkmisc() which walks the tree and calls action() for each node. You need to find out why one of the tree nodes has an invalid address. -- WBR, wRAR
signature.asc
Description: PGP signature