From owner-freebsd-hackers Thu Oct 8 14:39:42 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA25383 for freebsd-hackers-outgoing; Thu, 8 Oct 1998 14:39:42 -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 OAA25370 for ; Thu, 8 Oct 1998 14:39:33 -0700 (PDT) (envelope-from Studded@gorean.org) Received: from gorean.org (Studded@localhost [127.0.0.1]) by dt053nb4.san.rr.com (8.8.8/8.8.8) with ESMTP id OAA27015; Thu, 8 Oct 1998 14:39:14 -0700 (PDT) (envelope-from Studded@gorean.org) Message-ID: <361D3102.3EDDF6FB@gorean.org> Date: Thu, 08 Oct 1998 14:39:14 -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: <199810082035.NAA00434@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: > 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