Puzzling stack trace

Dag-Erling Smørgrav des at des.no
Fri Mar 26 12:43:18 UTC 2010


Peter Steele <psteele at 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 != 0) {
                const unsigned char *p = s;

                do {
                        if (*p++ == (unsigned char)c)
                                return ((void *)(p - 1));
                } while (--n != 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=-g)

DES
-- 
Dag-Erling Smørgrav - des at des.no


More information about the freebsd-hackers mailing list