Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 08 Oct 1998 01:07:28 -0700
From:      Mike Smith <mike@smith.net.au>
To:        Studded <Studded@dal.net>
Cc:        Mike Smith <mike@smith.net.au>, Archie Cobbs <archie@whistle.com>, FreeBSD-Hackers@FreeBSD.ORG
Subject:   Re: mail in free(): warning: junk pointer, too high to make sense. 
Message-ID:  <199810080807.BAA02135@dingo.cdrom.com>
In-Reply-To: Your message of "Thu, 08 Oct 1998 00:46:17 PDT." <361C6DC9.C5D6D07B@dal.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 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

Yup, that's almost certainly junk alright.  It's also "dir/" which may 
or may not mean anything interesting.  Certainly a suspicios set of 
characters.

> > 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.

Sorry, I meant "replace all occurences of 'msgvec' in lex.c with 
'msgfoo', then recompile".  You might want to make it static too, ie 
change line 158 to 'static int *msgvec;'.
-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\  msmith@cdrom.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



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