Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Mar 2010 13:43:16 +0100
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        Peter Steele <psteele@maxiscale.com>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: Puzzling stack trace
Message-ID:  <86iq8jl0d7.fsf@ds4.des.no>
In-Reply-To: <7B9397B189EB6E46A5EE7B4C8A4BB7CB3B5AACBE@MBX03.exg5.exghost.com> (Peter Steele's message of "Fri, 26 Mar 2010 07:33:10 -0500")
References:  <7B9397B189EB6E46A5EE7B4C8A4BB7CB3B5AACBE@MBX03.exg5.exghost.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Peter Steele <psteele@maxiscale.com> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86iq8jl0d7.fsf>