From owner-cvs-all@FreeBSD.ORG Fri Mar 4 16:34:04 2005 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7717016A4CE; Fri, 4 Mar 2005 16:34:04 +0000 (GMT) Received: from mailout2.pacific.net.au (mailout2.pacific.net.au [61.8.0.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id DBDBD43D39; Fri, 4 Mar 2005 16:34:03 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.0.87])j24GY2Hn027225; Sat, 5 Mar 2005 03:34:02 +1100 Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) j24GXtMq032582; Sat, 5 Mar 2005 03:33:56 +1100 Date: Sat, 5 Mar 2005 03:33:55 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: John Baldwin In-Reply-To: <200503031116.22840.jhb@FreeBSD.org> Message-ID: <20050305032619.K18638@delplex.bde.org> References: <200503031116.22840.jhb@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: Scott Long cc: src-committers@freebsd.org cc: cvs-src@freebsd.org cc: cvs-all@freebsd.org cc: Daniel Eischen cc: David Xu Subject: Re: cvs commit: src/sys/kern kern_sig.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Mar 2005 16:34:04 -0000 On Thu, 3 Mar 2005, John Baldwin wrote: > On Thursday 03 March 2005 10:21 am, Daniel Eischen wrote: >> Can you add assertions in msleep(), cv_wait(), etc, to >> panic if the object is on the kernel stack and the >> stack is swappable? > > Just because you sleep on a stack address doesn't mean that you are going to > write to that object when doing a wakeup. However, it might not be a bad > idea as stack address can be indicative of bugs like this: Sleeping on a stack address is just a bug, since it depends on the undocumented (?) implementation detail that stacks for diferent processes don't overlap for the address to be unique. Overlapping stacks was the the usual case until relatively recently. For threads in the same process, the stacks must be separate to work, but this need not be the case for processes. Bruce