[1181] in Moira

home help back first fref pref prev next nref lref last post

[daemon@ATHENA.MIT.EDU : inbsd 8.0.4: listmaint]

daemon@ATHENA.MIT.EDU (Nathan J. Williams)
Wed Jul 8 12:55:15 1998

Date: Wed, 8 Jul 1998 12:55:10 -0400 (EDT)
From: "Nathan J. Williams" <nathanw@MIT.EDU>
To: bug-moira@MIT.EDU


	This belongs over here... the bug seems to be cross-platform.
	- Nathan

------- Forwarded transaction

[0112]  daemon@ATHENA.MIT.EDU (Richard E Courtemanche) SIPB-Athena Bugs 07/08/98 00:28 (141 lines)
Subject: inbsd 8.0.4: listmaint
From kilroy@MIT.EDU Wed Jul 08 04:28:36 1998
Return-Path: <kilroy@MIT.EDU>
Delivered-To: sipb-athena-bugs-mtg@bloom-picayune.mit.edu
Received: (qmail 29660 invoked from network); 8 Jul 1998 04:28:36 -0000
Received: from unknown (HELO MIT.EDU) (18.72.1.2)
  by bloom-picayune.mit.edu with SMTP; 8 Jul 1998 04:28:36 -0000
Received: from SNORKLEWACKER.MIT.EDU by MIT.EDU with SMTP
	id AA01360; Wed, 8 Jul 98 00:28:31 EDT
Received: by snorklewacker.mit.edu (8.8.8/4.7) id AAA19716; Wed, 8 Jul 1998 00:28:34 -0400 (EDT)
Date: Wed, 8 Jul 1998 00:28:34 -0400 (EDT)
Message-Id: <199807080428.AAA19716@snorklewacker.mit.edu>
From: Richard E Courtemanche <kilroy@MIT.EDU>
To: sipb-athena-bugs@MIT.EDU
Subject: inbsd 8.0.4: listmaint
Cc: kilroy@MIT.EDU

System name:		snorklewacker.mit.edu
Type and version:	Intel_Pentium_II_(686-class) 8.0.4 (with mkserv)
Display type:		XFree86 3.3.2 Mach64

What were you trying to do?
	Select option '8' - quotas.
        Select option '8' - toggle verbose.

What's wrong:
	It segv's.

What should have happened:
	A message would have been nice. :)

Please describe any relevant documentation references:
        Checked latest rev, of menu.c 1.51, still not fixed.

kdump:
[snorklewacker] 12:12am ~>kdump
 19472 ktrace   RET   ktrace 0
 19472 ktrace   CALL  __sysctl(0xefbfcf70,0x2,0xba80,0xefbfcf78,0,0)
 19472 ktrace   RET   __sysctl 0
 19472 ktrace   CALL  break(0xbab8)
 19472 ktrace   RET   break 0
 19472 ktrace   CALL  break(0xbffc)
 19472 ktrace   RET   break 0
 19472 ktrace   CALL  break(0xcffc)
 19472 ktrace   RET   break 0
 19472 ktrace   CALL  execve(0xefbfcfd8,0xefbfd44c,0xefbfd454)
 19472 ktrace   RET   execve -1 errno 2 No such file or directory
 19472 ktrace   CALL  execve(0xefbfcfd8,0xefbfd44c,0xefbfd454)
 19472 ktrace   RET   execve -1 errno 2 No such file or directory
 19472 ktrace   CALL  execve(0xefbfcfd8,0xefbfd44c,0xefbfd454)
 19472 ktrace   RET   execve -1 errno 2 No such file or directory
 19472 ktrace   CALL  execve(0xefbfcfd8,0xefbfd44c,0xefbfd454)
 19472 sh       RET   execve JUSTRETURN
 19472 sh       CALL  getpid
 19472 sh       RET   getpid 19472/0x4c10
 19472 sh       CALL  geteuid
 19472 sh       RET   geteuid 13713/0x3591
 19472 sh       CALL  __sysctl(0xefbfd364,0x2,0x4b7a0,0xefbfd36c,0,0)
 19472 sh       RET   __sysctl 0
 19472 sh       CALL  break(0x4c3fc)
 19472 sh       RET   break 0
 19472 sh       CALL  break(0x4cffc)
 19472 sh       RET   break 0
 19472 sh       CALL  break(0x4dffc)
 19472 sh       RET   break 0
 19472 sh       CALL  open(0xefbfd4c4,0,0xefbfd43c)
 19472 sh       RET   open 3
 19472 sh       CALL  fcntl(0x3,0,0xa)
 19472 sh       RET   fcntl 10/0xa
 19472 sh       CALL  close(0x3)
 19472 sh       RET   close 0
 19472 sh       CALL  fcntl(0xa,0x2,0x1)
 19472 sh       RET   fcntl 0
 19472 sh       CALL  getuid
 19472 sh       RET   getuid 13713/0x3591
 19472 sh       CALL  geteuid
 19472 sh       RET   geteuid 13713/0x3591
 19472 sh       CALL  getgid
 19472 sh       RET   getgid 101/0x65
 19472 sh       CALL  getegid
 19472 sh       RET   getegid 101/0x65
 19472 sh       CALL  read(0xa,0x4bdac,0x3ff)
 19472 sh       RET   read 66/0x42
 19472 sh       CALL  execve(0x4b874,0x4b8ec,0x4b900)

end kdump:

stack trace:
#0  0xe82b in Put_message (msg=0x166ff "Delete functions will be silent\n")
    at menu.c:596
#1  0x1675a in ToggleVerboseMode (argc=1, argv=0xefbfaf10) at utils.c:390
#2  0xe1a1 in Do_menu (m=0x3c0b4, margc=1, margv=0xefbfbf94) at menu.c:381
#3  0xe1d9 in Do_menu (m=0x41004, margc=-1, margv=0x0) at menu.c:386
#4  0xd40c in Start_menu (m=0x41004) at menu.c:112
#5  0xd0f2 in main (argc=1, argv=0xefbfd448) at main.c:155
end stack trace

problem:

from /afs/athena.mit.edu/astaff/project/moiradev/src/clients/moira/menu.c
 /* Print a message in the input window of cur_ms.  */
    587 void Put_message(char *msg)
    588 {
    589   char *copy, *line, *s;
    590
    591   copy = malloc(COLS);
    592   s = line = msg;
    593   if (log_file)
    594     {
    595       /* if we're doing logging; we assume that the file has already
    596          been opened. */
    597       fprintf(log_file, "%s\n", msg);
    598       fflush(log_file);
    599     }
    600
    601   while (*s++)
    602     {
    603       if (s - line >= COLS - 1)
    604         {
    605           strncpy(copy, line, COLS - 1);
    606           copy[COLS - 1] = '\0';
    607           line += COLS - 1;
    608         }
    609       else if (*s == '\n')
    610         {
    611           *s = '\0';
    612           strcpy(copy, line);
    613           line = ++s;
    614         }
    615       else
    616         continue;
    617       Put_line(copy);
    618     }
    619   Put_line(line);
    620   free(copy);
    621 }


line 611 in this case, tries to modify a constant string.
Either function should be declared as taking a const char or different use.


--[0112]--

------- End forwarded transaction

home help back first fref pref prev next nref lref last post