From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23129 invoked by alias); 11 Nov 2006 01:23:51 -0000 Received: (qmail 23119 invoked by uid 22791); 11 Nov 2006 01:23:50 -0000 X-Spam-Check-By: sourceware.org Received: from mo-p00-ob.rzone.de (HELO mo-p00-ob.rzone.de) (81.169.146.160) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 11 Nov 2006 01:23:45 +0000 Received: from ollie.block.home by mo-p00-ob.rzone.de (RZmta 2.4) with ESMTP id iAAL4oms04e23A for ; Sat, 11 Nov 2006 02:23:42 +0100 (MET) Date: Sat, 11 Nov 2006 01:23:00 -0000 From: Oliver Block To: gdb@sourceware.org Subject: segmentation fault User-Agent: KMail/1.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <200611110223.10111.lists@block-online.eu> 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/msg00070.txt.bz2 Hello, a program causes a segmentation fault and I'd like to know if I interpret the following gdb output correctly (text continues after output): ************************************************************************************ #1  0x4012eb3f in gethostbyname () from /lib/tls/libc.so.6 No symbol table info available. #2  0x08049312 in http_send_recv (hostname=0x804a340 "www.oliver-block.eu",     request=0x804b030 "GET /checkip.php HTTP/1.0\r\nHost: www.oliver-block.eu\r\n\r\n") at ddnscli.c:168         hptr = (struct hostent *) 0x804b068         sptr = (struct servent *) 0x804b028         sin = {sin_family = 2, sin_port = 0, sin_addr = {s_addr = 0},   sin_zero = "\000\000\000\000\000\000\000"}         s = 134514323         retval = 45         n = 0         buflen = 1024 #3  0x080498ee in get_ip (qry=0x804b008) at ddnscli.c:323         tmp = 0x0         r = 0x804b030 "GET /checkip.php HTTP/1.0\r\nHost: www.oliver-block.eu\r\n\r\n" #4  0x080499fa in main (argc=3, argv=0xbffff1a4) at ddnscli.c:398         option = 8 '\b'         q = (struct query *) 0x804b008 (gdb) p sizeof(struct servent) $1 = 16 **************************************************************************** When I extract from #2: sptr = (struct servent *) 0x804b028 from #4: r = 0x804b030 "GET /checkip.php HTTP/1.0\r\nHost: www.oliver-block.eu\r\n\r\n" as servent has a size of 16 bytes 804b028 + 16 = 0x804b038 These two variables seem to overlap. Do you agree? Regards, Oliver -- Leben ist mehr als ...