From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32275 invoked by alias); 11 Nov 2006 20:29:52 -0000 Received: (qmail 32265 invoked by uid 22791); 11 Nov 2006 20:29:51 -0000 X-Spam-Check-By: sourceware.org Received: from smtp02.ya.com (HELO smtpauth.ya.com) (62.151.11.161) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 11 Nov 2006 20:29:43 +0000 Received: from [83.61.43.102] (helo=[192.168.1.2]) by smtpauth.ya.com with asmtp id 1GizTu-00030l-00 for gdb@sourceware.org; Sat, 11 Nov 2006 21:29:38 +0100 Message-ID: <455632B3.2020909@ya.com> Date: Sat, 11 Nov 2006 20:29:00 -0000 From: =?UTF-8?B?UmHDumwgSHVlcnRhcw==?= User-Agent: Thunderbird 1.5.0.7 (X11/20060921) MIME-Version: 1.0 CC: gdb@sourceware.org Subject: Re: segmentation fault References: <200611110221.11772.oliver@block-online.eu> In-Reply-To: <200611110221.11772.oliver@block-online.eu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-11/txt/msg00074.txt.bz2 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.