From owner-freebsd-hackers Thu Oct 8 00:46:37 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA13647 for freebsd-hackers-outgoing; Thu, 8 Oct 1998 00:46:37 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from dt053nb4.san.rr.com (dt053nb4.san.rr.com [204.210.34.180]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA13632 for ; Thu, 8 Oct 1998 00:46:33 -0700 (PDT) (envelope-from Studded@dal.net) Received: from dal.net (Studded@localhost [127.0.0.1]) by dt053nb4.san.rr.com (8.8.8/8.8.8) with ESMTP id AAA17690; Thu, 8 Oct 1998 00:46:18 -0700 (PDT) (envelope-from Studded@dal.net) Message-ID: <361C6DC9.C5D6D07B@dal.net> Date: Thu, 08 Oct 1998 00:46:17 -0700 From: Studded Organization: Triborough Bridge & Tunnel Authority X-Mailer: Mozilla 4.5b2 [en] (X11; I; FreeBSD 2.2.7-STABLE-0929 i386) X-Accept-Language: en MIME-Version: 1.0 To: Mike Smith CC: Archie Cobbs , FreeBSD-Hackers@FreeBSD.ORG Subject: Re: mail in free(): warning: junk pointer, too high to make sense. References: <199810080538.WAA01196@dingo.cdrom.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Mike Smith wrote: > > Attempting to run it in gdb got a different response: > > (gdb) run > > Starting program: /usr/home/myusername/./mail > > mail in free(): error: junk pointer, too high to make sense. > > > > Program received signal SIGABRT, Aborted. > > 0x20080d51 in kill () > > (gdb) bt > > #0 0x20080d51 in kill () > > #1 0x200805c4 in abort () > > #2 0x2007f01c in getdtablesize () > > #3 0x2007f058 in getdtablesize () > > #4 0x2008007d in getdtablesize () > > #5 0x200802ba in free () > > #6 0x9263 in setmsize (sz=0) at lex.c:445 > > #7 0x88b2 in setfile (name=0x1b080 "/var/mail/myusername") at lex.c:146 > > #8 0xb492 in main (argc=1, argv=0xefbfd768) at main.c:246 > > > > I hope this is what you were looking for. My experience with gdb is > > limited, my C only slightly less so. :) > > Try 'frame 5', 'print msgvec'. (gdb) frame 5 #5 0x200802ba in free () (gdb) print msgvec $1 = (int *) 0x2f726964 > You could try replacing all occurrences of 'msgvec' in lex.c with > 'msgfoo' and see if the problem changes. Ok, here is the result. Frame 6 is different in this one. (gdb) run Starting program: /usr/home/myusername/mail mail in free(): error: junk pointer, too high to make sense. Program received signal SIGABRT, Aborted. 0x20080d51 in kill () (gdb) bt #0 0x20080d51 in kill () #1 0x200805c4 in abort () #2 0x2007f01c in getdtablesize () #3 0x2007f058 in getdtablesize () #4 0x2008007d in getdtablesize () #5 0x200802ba in free () #6 0x9263 in setmsize (sz=3) at lex.c:445 #7 0x88b2 in setfile (name=0x1b080 "/var/mail/myusername") at lex.c:146 #8 0xb492 in main (argc=1, argv=0xefbfd768) at main.c:246 (gdb) frame 5 #5 0x200802ba in free () (gdb) print msgfoo No symbol "msgfoo" in current context. (gdb) frame 6 #6 0x9263 in setmsize (sz=3) at lex.c:445 445 free((char *) msgvec); (gdb) print msgfoo No symbol "msgfoo" in current context. (gdb) print msgvec $1 = (int *) 0x2f726964 (gdb) frame 5 #5 0x200802ba in free () (gdb) print msgvec $2 = (int *) 0x2f726964 Hope this helps, Doug -- *** Chief Operations Officer, DALnet IRC network *** Go PADRES! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message