Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Date: Tue, 26 Jun 2001 22:40:32 -0700 (PDT)
Message-Id: <20010626.224032.52840623.Takaaki.Ota@am.sony.com>
To: cygwin@cygwin.com
Subject: Re: pthreads works, sorta
From: Tak Ota <Takaaki.Ota@am.sony.com>
In-Reply-To: <20010627012932.I19058@redhat.com>
References: <EA18B9FA0FE4194AA2B4CDB91F73C0EF08F09E@itdomain002.itdomain.net.au>
	<20010627012932.I19058@redhat.com>
X-Mailer: Mew version 1.95b126 on Emacs 21.0.103.1 / Mule 5.0 (SAKAKI)
X-Telephone: +1-858-942-3239
X-Fax------: +1-858-942-9142
X-SnailMail: 16450 West Bernardo Drive MZ7205, San Diego, CA 92127-1804
Organization: Sony Electronics Inc.
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

How about using IsBadReadPtr in addition to IsBadWritePtr?

-Tak

On Wed, 27 Jun 2001 01:29:32 -0400, Christopher Faylor <cgf@redhat.com> wrote:

> On Wed, Jun 27, 2001 at 01:10:35PM +1000, Robert Collins wrote:
> >> -----Original Message-----
> >> From: Greg Smith [mailto:gsmith@nc.rr.com]
> > 
> >> 
> >> More experimenting with my home computer, dual pIII 850:
> >> 
> >> 1. 117  157 328
> >> 2. 822 1527 ---
> >> 3. 194  240 453
> >> 4. 169  181 516
> >> 
> >As usual, I write a missive, then solve the puzzle.
> >
> >try this:
> >
> >
> >int __stdcall
> >check_valid_pointer (void *pointer)
> >{
> >  if (!pointer || IsBadWritePtr(pointer, sizeof (verifyable_object)))
> >    return EFAULT;
> >  return 0;
> >}
> 
> This is not quite the same thing as VirtualQuery.  This verifies that the
> process can write to memory.  It doesn't verify that it is accessible.
> 
> Maybe that is not important but I would have to think about this.
> 
> Nice find, though, Rob.
> 
> cgf
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting:         http://cygwin.com/bugs.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

