On Wed, Jan 09, 2019 at 10:49:48PM +0100, Andreas Tille wrote: > > > to find the exact code line 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. > > When I was running the code with some more debugging info activated > I had pretty valid looking adresses 0x555666 And still SEGV?
> > > The values of the structure are set in line 350 and are OK there. > > The problem is not about the structure fields but about the structure > > pointer itself though. > > ... > > You need to find out why one of the tree nodes has an invalid address. > > Can you propose any means to find this out? As usual: reading the code, debugging, printfs. Address sanitizer and/or valgrind may or may not help too. > I have no idea about specific compiler differences. I don't think pondering compiler differences can be helpful here, it's most likely bad code that is working file with some compilers but is still bad code. -- WBR, wRAR
Description: PGP signature