From owner-freebsd-hackers Thu Oct 8 17:42:49 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA02046 for freebsd-hackers-outgoing; Thu, 8 Oct 1998 17:42:49 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from dingo.cdrom.com (dingo.cdrom.com [204.216.28.145]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA01972 for ; Thu, 8 Oct 1998 17:42:27 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost.cdrom.com [127.0.0.1]) by dingo.cdrom.com (8.9.1/8.8.8) with ESMTP id RAA01827; Thu, 8 Oct 1998 17:46:24 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Message-Id: <199810090046.RAA01827@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: Studded cc: Mike Smith , Archie Cobbs , FreeBSD-Hackers@FreeBSD.ORG Subject: Re: mail in free(): warning: junk pointer, too high to make sense. In-reply-to: Your message of "Thu, 08 Oct 1998 14:39:14 PDT." <361D3102.3EDDF6FB@gorean.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 08 Oct 1998 17:46:24 -0700 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Mike Smith wrote: > > > 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: That's because there's a bug in your command; you should be passing $FILE to nm, not "*.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? I'm still wondering how it gets corrupted. Making it static will have the effect of moving it around. The fact that it was corrupted with something that looks very much like ASCII has me wondering whether there's not a buffer overflow going on. Can you try 'nm mail | sort | more' and look at the symbols directly before msgvec? I'd be inclined to suspect that there's a fixed-size character buffer there that's just not big enough for something on your system. -- \\ 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