Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com content-class: urn:content-classes:message Subject: RE: exceptions MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Date: Tue, 20 Mar 2001 12:07:32 +1100 X-MimeOLE: Produced By Microsoft Exchange V6.0.4417.0 Message-ID: Thread-Topic: exceptions Thread-Index: AcCw1XlS4OsdlGrgRWOXuBYpuD1EnQABHCOw From: "Robert Collins" To: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id UAA27692 Thanks Chris, I took your code and cut it back to /* Generic memory acccess routine - where should it live ? */ int __stdcall check_valid_pointer (void *pointer) { MEMORY_BASIC_INFORMATION m; if (!pointer || !VirtualQuery (pointer, &m, sizeof (m)) || (m.State != MEM_COMMIT)) return EFAULT; return 0; } because thread.cc should not depend on path.h IMO... and the check for *name was not necessarily appropriate in all cases for me. However the path.cc function should wrap this one, but my question is - where should check_valid_pointer go? Rob > -----Original Message----- > From: Christopher Faylor [mailto:cgf AT redhat DOT com] > Sent: Tuesday, March 20, 2001 11:18 AM > To: cygwin-developers AT cygwin DOT com > Subject: Re: exceptions > > > On Tue, Mar 20, 2001 at 10:20:38AM +1100, Robert Collins wrote: > >are we able to use c++ exception handling within cygwin1.dll? > > No, not currently. I don't remember if this doesn't work in DLLs > or if it bloated the code alarmingly. > > >ie to guard against invalid memory access on user supplied > parameters? > > check_null_empty_path is the method for doing that. It validates an > address. Probably should change the name... > > cgf >