From owner-freebsd-current Fri Sep 19 14:30:49 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id OAA10266 for current-outgoing; Fri, 19 Sep 1997 14:30:49 -0700 (PDT) Received: from usr06.primenet.com (tlambert@usr06.primenet.com [206.165.6.206]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id OAA10261; Fri, 19 Sep 1997 14:30:38 -0700 (PDT) Received: (from tlambert@localhost) by usr06.primenet.com (8.8.5/8.8.5) id OAA05946; Fri, 19 Sep 1997 14:30:18 -0700 (MST) From: Terry Lambert Message-Id: <199709192130.OAA05946@usr06.primenet.com> Subject: Re: FYI: regarding our rfork(2) To: nate@mt.sri.com (Nate Williams) Date: Fri, 19 Sep 1997 21:30:17 +0000 (GMT) Cc: tlambert@primenet.com, toor@dyson.iquest.net, nate@mt.sri.com, dyson@freebsd.org, karpen@ocean.campus.luth.se, current@freebsd.org In-Reply-To: <199709192104.PAA20740@rocky.mt.sri.com> from "Nate Williams" at Sep 19, 97 03:04:29 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > The problem is that I may pass auto variables between threads: > > Then you have problems. Heh. But am I violating any principles? 8-). > I would argue that this program has many problems, waiting to happen > that could be partially avoided by not using the stack. But, as Sean > already pointed out to me many times, "that's the way things work in C, > and we need to be backwards compatible". Yep; "Intel: We put the 'backwards' in 'backwards compatible'". 8-). > Why not allocate your struct req from the heap, which avoids someone > reading/writing bogus data on your stack, thus corrupting it. Then > again, I guess you could argue that *IFF* your stack gets corrupted, > you'll know you're over-writing memory a heck of a lot quicker. :) Well, it's not really any better for a program to write bogus stuff on my heap. 8-). If we're assuming that the program is doing bogus stuff, then we've got to say that the results of running the program are undefined. > In any case, I'm convinced that it's necessary in order to fully support > C-Threads. Stacks in seperate address spaces are needed to fully support C-Threads? You can't just say interesting stuff like that, and then not tell us why! 8-). Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.