This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: pthreads works, sorta - got it


On Thu, Jun 28, 2001 at 12:21:11AM +1000, Robert Collins wrote:
>Got the bug... attached is a correct patch that doesn't break anything
>AFAICT.
>
>GCC was optimising the variable access when the macro
>check_null_empty-path_errno was used, and accessing the memory area _before_
>the readcheck! The overhead of a proper function should be lower than that
>of VirtualQueryHowever, so I've made it a function. It could have the guts
>of check_null_empty_path copied into it for speed, but that's optional IMO.
>
>Wed Jun 27 23:30:00 2001  Robert Collins <rbtcollins@hotmail.com>
>
>	* path.h (check_null_empty_path_errno): Convert to a function
>	prototype.
>	* path.cc (check_null_empty_path_errno): New function.
>	(check_null_empty_path): Change from VirtualQuery to IsBadWritePtr.
>	* resource.cc (getrlimit): Ditto.
>	(setrlimit): Ditto.
>	* thread.cc (check_valid_pointer): Ditto.

Thanks for the patch.  I took it a step further.  I renamed the _path
stuff to _str for consistency, and created some
check_null_invalid_struct* functions.

It has been checked in.

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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]