Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 08 Oct 1998 14:39:14 -0700
From:      Studded <Studded@gorean.org>
To:        Mike Smith <mike@smith.net.au>
Cc:        Archie Cobbs <archie@whistle.com>, FreeBSD-Hackers@FreeBSD.ORG
Subject:   Re: mail in free(): warning: junk pointer, too high to make sense.
Message-ID:  <361D3102.3EDDF6FB@gorean.org>
References:  <199810082035.NAA00434@dingo.cdrom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Mike Smith wrote:

> This isn't a fix, unfortunately.

	Course not, that would be too easy. :) 
 
> It means that there are two instances of 'msgvec' with global scope,
> and the other one needs to be found too.
> 
> You could probably just change the 'msgvec' in lex.c to be static in
> order to achieve that goal; then you need to work out which object(s)
> are exporting 'msgvec' as globals.
> 
> Any chance of you doing that?  Have a look at the output of 'nm' on each
> of the .o files, and see which (if any) export or reference _msgvec.

	ok, when I use the version of lex.c which has msgfoo declared static I
get no _msgvec in any .o file. When I restore the original lex.c file,
then declare msgvec static here is what I get:

 55# for FILE in `ls -1 *.o`; do echo $FILE; nm *.o | grep _msgvec |
\more; done
aux.o
00001354 b _msgvec

and identical output for the following files:

cmd1.o cmd2.o cmd3.o cmdtab.o collect.o edit.o fio.o
getname.o head.o lex.o list.o main.o names.o popen.o
quit.o send.o strings.o temp.o tty.o v7.local.o
vars.o version.o

However, looking at the files where msgvec is used, the only place it's
declared globally is lex.c. When I tested the binary compiled with the
static declaration in lex.c using gdb + AJ -> malloc.conf it didn't
core, and there were no error messages. So perhaps making it static in
lex.c is the answer after all?

	In any case I appreciate the lessons in debugging, I will try to put
them to good use. Let me know if there is anything else you need. 

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?361D3102.3EDDF6FB>