Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!mit-eddie!ll-xn!ames!aurora!labrea!jade!ucbvax!ucdavis!martin@iris.ucdavis.edu (Bruce K. Martin Jr.) From: martin@iris.ucdavis.edu (Bruce K. Martin Jr.) Newsgroups: comp.os.minix Subject: bug in chmem.c Message-ID: <774@ucdavis.UUCP> Date: Fri, 18-Sep-87 17:20:40 EDT Article-I.D.: ucdavis.774 Posted: Fri Sep 18 17:20:40 1987 Date-Received: Sun, 20-Sep-87 05:06:49 EDT Sender: uucp@ucdavis.UUCP Reply-To: martin@iris.ucdavis.edu (Bruce K. Martin Jr.) Organization: University of California, Davis Lines: 22 Symptoms: chmem was allocating to much memory (over 64K) to exectuables when given a command such as chmem =64000 mined This would cause mined to crash. This will be a problem if you are compiling your programs without seperate I & D (namely with the minix cc). What happens is that when chmem calculates the new header field TOTAL, it does not remove the text space size until after the new TOTAL has been written. Here is the diff to chmem.c 55a56 > if (separate == 0) newtot += header[TEXT]; 59d59 < if (separate == 0) newtot += header[TEXT]; ...bruce Bruce K. Martin Jr. UC. Davis Div. of Computer Science martin@iris.ucdavis.edu --or-- {ucbvax | lll-crg}!ucdavis!iris!martin