From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 26 12:43:17 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1544106564A for ; Fri, 26 Mar 2010 12:43:17 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id B1D978FC0A for ; Fri, 26 Mar 2010 12:43:17 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id C208C1FFC22; Fri, 26 Mar 2010 12:43:16 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id A187D84495; Fri, 26 Mar 2010 13:43:16 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Peter Steele References: <7B9397B189EB6E46A5EE7B4C8A4BB7CB3B5AACBE@MBX03.exg5.exghost.com> Date: Fri, 26 Mar 2010 13:43:16 +0100 In-Reply-To: <7B9397B189EB6E46A5EE7B4C8A4BB7CB3B5AACBE@MBX03.exg5.exghost.com> (Peter Steele's message of "Fri, 26 Mar 2010 07:33:10 -0500") Message-ID: <86iq8jl0d7.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: "freebsd-hackers@freebsd.org" Subject: Re: Puzzling stack trace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Mar 2010 12:43:18 -0000 Peter Steele writes: > #8 0x00000008011ffe8f in malloc () from /lib/libc.so.7 > > #9 0x000000080127374b in memchr () from /lib/libc.so.7 The stack trace is clearly incorrect: void * memchr(const void *s, int c, size_t n) { if (n !=3D 0) { const unsigned char *p =3D s; do { if (*p++ =3D=3D (unsigned char)c) return ((void *)(p - 1)); } while (--n !=3D 0); } return (NULL); } Type "frame 9" and see what it says. If the bug is easily reproducable, try reproducing it with a debugging version of libc (buildworld with DEBUG_FLAGS=3D-g) DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no