jerryp@AMAX.NPAC.SYR.EDU (Jerry Peek) (02/25/88)
[I'm sorry if this is the wrong place; maybe this message should have gone to Bug-MH@UCI instead?] We've just started running MH on an Encore Multimax 320 running UMAX 4.2. We have MH 6.5. It compiles fine -- comp and scan work, too -- but many commands (rmm, folders, repl, forw, maybe others?) dump core. I think it has something to do with the .mh_sequences file -- or a function that reads/writes it?? We've seen stuff like this in the file: cur: 182 ^B: 140 pseq: 182 where the ^B is an ASCII 02. If we take the bogus line out, that doesn't fix the problem. One more clue: if the current message has been removed (if cur points to a missing message), the commands don't seem to dump core. There's a demo script below. Before we dig into the code, I thought I'd ask: Has a bug fix been posted for something like this? Or, any clues where we should start looking? Thanks a lot. --Jerry Peek Northeast Parallel Architectures Center; Syracuse, NY jerryp@amax.npac.syr.edu (315)423-1722 --------------------------------------------------------------------------- Script started on Tue Feb 23 15:17:45 1988 $ folder +inbox inbox+ has 118 messages ( 1- 182). $ pwd /u1/npac/jerryp/.Mail/inbox $ cat -v .mh_sequences cur: 189 pseq: 1 $ scan cur scan: no cur message $ forw forw: no cur message $ mark -seq cur last $ scan cur 182+ 02/23 nicky@amax.npac.s Meeting time changed <<Plans have changed a litt $ forw Memory fault - core dumped $ ed .mh_sequences 19 /cur/s/82/89/p cur: 189 w 19 q $ forw forw: no cur message $ forw -help | tail -2 version: MH 6.5 #50[UCI] (amax) of Mon Dec 21 16:23:16 EST 1987 options: [BSD42] [MHRC] [UCI] [RPATHS] [BERK] [SENDMTS] $ repl repl: no cur message $ repl last Reply to nicky@amax.NPAC.SYR.EDU? n Reply to fred@amax.NPAC.SYR.EDU? y Memory fault - core dumped $ repl -help | tail -2 version: MH 6.5 #50[UCI] (amax) of Mon Dec 21 16:23:16 EST 1987 options: [BSD42] [MHRC] [UCI] [RPATHS] [BERK] [SENDMTS] $ egrep "repl|forw|equ" ~/.mh_profile Unseen-Sequence: unseen Previous-Sequence: pseq repl: -query -nocc me replr: -filter replr.filter -query -editor replr.fixmsg -nocc me forw: -annotate -form components $ ^D script done on Tue Feb 23 15:25:03 1988
joes%mitre-bedford.arpa@ICS.UCI.EDU (Joe Salerno) (02/26/88)
On 11 January 1988, we completed porting MHmail, Ver- sion 6.5 #221[UCI], to an ENCORE, running UMAX4.2. The source we used had been running on a VAX 8600 running ULTRIX-32. Most of the changes were required because the ENCORE's C compiler treated initialization differently from the VAX's C compiler. In this regard, the following two quotations are relevant: "Static and external variables which are not initialized are guaranteed to start off as 0; automatic or register variables which are not initialized are guaranteed to start off as garbage." "The C Programming Language" --- B. W. Kernighan and D. M. Ritchie, p. 198 "To remain compatible with the largest number of compilers, we recommend (you)...include an explicit initializer..." "C---A Reference Manual"---S. P. Harbison and G. L. Steele, Jr, p. 80. Two of the changes corrected coding errors (see sbr/m_getfld.c and the invocation of m_scratch() in uip/post.c). The conf/MH file we used is attached. The most impor- tant change in this file was the use of sendmail instead of sendmail/smtp we use on the VAX 8600. ----------------------------- Code diffs ----------------------------- OUTPUT for diff mh-6.5/sbr/addrsbr.c.orig mh-6.5/sbr/addrsbr.c 373a374,375 > mp->m_next = ((char * ) (0)); /* added for ENCORE */ > 661c663,664 < static struct mailname mq; --- > /*static struct mailname mq;*/ /* ORIGINAL */ > static struct mailname mq = {((char *) (0))};/* mod for ENCORE */ ------------------------------------------------------------------------- OUTPUT for diff mh-6.5/sbr/m_getfld.c.orig mh-6.5/sbr/m_getfld.c 609c609,610 < if (strln > es) --- > /*if (strln > es)*/ /* ORIGINAL */ > if (str > es) /* mod for ENCORE */ ------------------------------------------------------------------------- OUTPUT for diff mh-6.5/sbr/m_gmsg.c.orig mh-6.5/sbr/m_gmsg.c 25c25,26 < static int len; --- > /*static int len;*/ /* ORIGINAL */ > static int len = 0; /* mod for ENCORE */ ------------------------------------------------------------------------- OUTPUT for diff mh-6.5/uip/bbc.c.orig mh-6.5/uip/bbc.c 131c131,132 < static char *rcfile; --- > static char *rcfile; /* ORIGINAL */ > static char *rcfile = NULL; /* mod for ENCORE */ 151c152,153 < *rc, --- > /**rc,*/ /* ORIGINAL */ > *rc = NULL, /* mod for ENCORE */ ------------------------------------------------------------------------- OUTPUT for diff mh-6.5/uip/post.c.orig mh-6.5/uip/post.c 211,212c211,212 < static int myuid; /* my user id */ < static int mygid; /* my group id */ --- > static int myuid = 0; /* my user id */ > static int mygid = 0; /* my group id */ 224,225d223 < static int linepos; /* putadr()'s position on the line */ < static int nameoutput; /* putadr() has output header name */ 226a225,233 > /* > Following 2 statements are the original ones; the next 2 were > initialized as a mod for ENCORE > */ > /*static int linepos;*/ /* putadr()'s position on the line */ > /*static int nameoutput;*/ /* putadr() has output header name */ > static int linepos = 0; /* putadr()'s position on the line */ > static int nameoutput = 0; /* putadr() has output header name */ > 248,251c255,262 < static struct mailname localaddrs; /* local addrs */ < static struct mailname netaddrs; /* network addrs */ < static struct mailname uuaddrs; /* uucp addrs */ < static struct mailname tmpaddrs; /* temporary queue */ --- > /* > Following 4 statements are the original ones; the next 4 were > initialized as mod for ENCORE > */ > /*static struct mailname localaddrs;*/ /* local addrs */ > /*static struct mailname netaddrs;*/ /* network addrs */ > /*static struct mailname uuaddrs;*/ /* uucp addrs */ > /*static struct mailname tmpaddrs;*/ /* temporary queue */ 252a264,267 > static struct mailname localaddrs = {NULL}; /* local addrs */ > static struct mailname netaddrs = {NULL}; /* network addrs */ > static struct mailname uuaddrs = {NULL}; /* uucp addrs */ > static struct mailname tmpaddrs = {NULL}; /* temporary queue */ 549c564,570 < (void) strcpy (tmpfil, m_scratch (m_maildir (invo_name))); --- > /* > mod for ENCORE: orig produces segmentation fault although it did not > always do this. case 1 and case 2 seem to work the same. > */ > /* orig */ /*(void) strcpy (tmpfil, m_scratch (m_maildir (invo_name)));*/ > /* case 1 *//*(void) strcpy (tmpfil, m_scratch ("",m_maildir (invo_name)));*/ > /* case 2 */(void) strcpy (tmpfil, m_scratch (m_maildir (invo_name),"")); 656c677 < else --- > else{ 657a679 > } 740c762 < for (count = 0; cp = getname (str); count++) --- > for (count = 0; cp = getname (str); count++){ 752a775 > } 1617c1640 < } --- > }/*UUCP recipients if for is OK */ 1977a2001 > ------------------------------------------------------------------------- OUTPUT for diff mh-6.5/uip/replsbr.c.orig mh-6.5/uip/replsbr.c 20c20,21 < static int dftype; --- > /*static int dftype;*/ /* ORIGINAL */ > static int dftype = 0; /* mod for ENCORE */ 21a23 > 23c25,26 < static char *dfhost; --- > /*static char *dfhost;*/ /* ORIGINAL */ > static char *dfhost = NULL; /* mod for ENCORE */ 25c28,29 < static struct mailname mq; --- > /*static struct mailname mq;*/ /* ORIGINAL */ > static struct mailname mq = {NULL}; /* mod for ENCORE */ 218c222,223 < static unsigned int bufsiz; /* current size of buf */ --- > /*static unsigned int bufsiz;*/ /* current size of buf *//* ORIGINAL */ > static unsigned int bufsiz = 0; /* current size of buf *//* mod for ENCORE */ 270c275 < if (orig == buf) --- > if (orig == buf){ 271a277 > } 332c338 < && uleq (np -> m_mbox, mp -> m_next -> m_mbox)) --- > && uleq (np -> m_mbox, mp -> m_next -> m_mbox)){ 333a340 > } ------------------------------------------------------------------------- OUTPUT for diff mh-6.5/uip/send.c.orig mh-6.5/uip/send.c 147c147 < *maildir, --- > *maildir = NULL, /* initialization mod for ENCORE */ 266d265 < ----------------------------------------------------------------- OUTPUT from diff mh-6.5/conf/MH.orig mh-6.5/conf/MH 3c3 < editor /usr/local/lib/mred.for.mh --- > editor /usr/ucb/vi 8c8 < mts sendmail/smtp --- > mts sendmail 12,13c12,13 < pop on < popbboards on --- > pop off > popbboards off