Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Wed, 27 Jun 2001 01:35:02 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: pthreads works, sorta Message-ID: <20010627013502.K19058@redhat.com> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20010627012932 DOT I19058 AT redhat DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.11i In-Reply-To: <20010627012932.I19058@redhat.com>; from cgf@redhat.com on Wed, Jun 27, 2001 at 01:29:32AM -0400 On Wed, Jun 27, 2001 at 01:29:32AM -0400, Christopher Faylor wrote: >On Wed, Jun 27, 2001 at 01:10:35PM +1000, Robert Collins wrote: >>> -----Original Message----- >>> From: Greg Smith [mailto:gsmith AT nc DOT rr DOT 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. I've thought about it. IsBadWritePtr should be fine in both check_null_empty_path and check_valid_pointer. Could you submit a patch, Rob? If you are motivated, I'd appreciate a cleanup patch for resource.cc, too. 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/