Re: segmentation fault

Raúl Huertas
2006-11-11T20:29:52Z

Oliver Block escribiÃ³:
> Hello,
> ...
> (gdb) p sizeof(struct servent)
> $1 = 16
>
> When I extract
>
> from #2:
> sptr = (struct servent *) 0x804b028
>
> from #4:
> r = 0x804b030
>
> as servent has a size of 16 bytes
>
> 804b028 + 16 = 0x804b038
>
> These two variables seem to overlap. Do you agree?
>
>
No. ;)
Maybe I'm wrong, but sptr is a pointer, so it uses 0x804b028 and 0x804b029.
The memory pointed by this pointer is the one that has size 16.

Regards,
Raul.