Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!sri-spam!mordor!lll-lcc!ptsfa!ihnp4!chinet!steinmetz!davidsen From: davidsen@steinmetz.UUCP Newsgroups: comp.os.minix Subject: Re: MINIX memory management/protection Message-ID: <1199@steinmetz.steinmetz.UUCP> Date: Wed, 11-Feb-87 14:49:10 EST Article-I.D.: steinmet.1199 Posted: Wed Feb 11 14:49:10 1987 Date-Received: Thu, 12-Feb-87 22:15:16 EST References: <252@hqda-ai.UUCP> <1169@steinmetz.steinmetz.UUCP> <511@bobkat.UUCP> <888@cartan.Berkeley.EDU> Reply-To: davidsen@kbsvax.UUCP (william E Davidsen) Organization: General Electric CRD, Schenectady, NY Lines: 36 Keywords: shared swapped jobs In article <888@cartan.Berkeley.EDU> ballou@brahms.Berkeley.EDU (Kenneth R. Ballou) writes: $In article <511@bobkat.UUCP> m5d@bobkat.UUCP (Mike McNally (dlsh)) writes: $>In article <1169@steinmetz.steinmetz.UUCP> davidsen@kbsvax.UUCP (william E Davidsen) writes: $>>=== what I wrote === $> $>What about a program with a bug in it? Like "strcpy(a, b)" when "a" is $>not quite what I meant? It's real easy to make this kind of mistake; $>how many times while debugging a program on a VAX (or whatever) do you $>get SIGBUS or SIGSEGV? $[Omitted here: a description of a phenomenon with which I'm sure we are $ all too painfully familiar -- how wild pointers can crash programs and $ machines.] $ $ $ However, this is a blatant lie, and it is possible you are $vindicated. For, if auto variables are allocated on the stack, one $could still easily lose. Since the stack must lie in the same segment $as the static data (otherwise, pointers must have segments associated $with them to distinguish between auto and static variables), it is $possible to scribble over the stack. In doing so, one could alter a $return address and find oneself in another process, or perhaps the ^^^^^^^^^^^^^^^^ $kernel. Also, equally likely is that one would try to execute data ^^^^^^ NO. You can find yourself somewhere in your own code segment. There is no way to wind up somewhere else. After you get to your own code segment there is a posibility of executing a far call, jump, or return. Since the return is 'under' the auto variables (lower address) and the most common errors run beyond the end of an array, this is unlikely but not imposible. -- bill davidsen sixhub \ ihnp4!seismo!rochester!steinmetz -> crdos1!davidsen chinet / ARPA: davidsen%crdos1.uucp@ge-crd.ARPA (or davidsen@ge-crd.ARPA)