Date: Wed, 19 Dec 2001 14:07:28 -0800
From: Manfred Antar [EMAIL PROTECTED]
mail dumps core on current with latest /usr/src/usr.bin/mail updates:
Yeah; I was able to reproduce that result.
I then re-made mail, this time with the -g flag, and tried again;
problem is detected in fixhead() (send.c:419).
Running it under gdb, I see some weird stuff happening (or maybe I'm
just confused). Here's the first part of fixhead():
/*
* Fix the header by glopping all of the expanded names from
* the distribution list into the appropriate fields.
*/
void
fixhead(hp, tolist)
struct header *hp;
struct name *tolist;
{
struct name *np;
hp-h_to = NULL;
hp-h_cc = NULL;
hp-h_bcc = NULL;
for (np = tolist; np != NULL; np = np-n_flink)
/* Don't copy deleted addresses to the header */
if (np-n_type GDEL)
continue;
if ((np-n_type GMASK) == GTO)
The failure is on the first conditional in the for loop. Watch this:
freebeast[22] gdb `which mail`
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB. Type show warranty for details.
This GDB was configured as i386-unknown-freebsd...
(gdb) b fixhead
Breakpoint 1 at 0x80545af: file /usr/src/usr.bin/mail/send.c, line 419.
(gdb) set args -v david
(gdb) r
Starting program: /usr/bin/mail -v david
Subject: Test 3
???
.
Cc:
Breakpoint 1, fixhead (hp=0xbfbff808, tolist=0x805f000)
at /usr/src/usr.bin/mail/send.c:419
419 {
(gdb) p hp
$1 = (struct header *) 0x805f000
(gdb) p tolist
$2 = (struct name *) 0x1
(gdb) n
422 hp-h_to = NULL;
(gdb) p hp
$3 = (struct header *) 0xbfbff808
(gdb) p tolist
$4 = (struct name *) 0x805f000
(gdb)
OK, I realize that constants aren't; variables won't, but this is getting
a bit much. Is, perhaps, something screwy happening with the stack pointer
(or some such thing; it's been ~8 years since I looked at the insides of
gcc)?
Cheers,
david
--
David H. Wolfskill [EMAIL PROTECTED]
I believe it would be irresponsible (and thus, unethical) for me to advise,
recommend, or support the use of any product that is or depends on any
Microsoft product for any purpose other than personal amusement.
To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message