Anamoly with ioctl() in cygwin 1.7.10

Corinna Vinschen corinna-cygwin@cygwin.com
Thu Mar 8 10:34:00 GMT 2012


On Mar  8 01:35, Lee Collier wrote:
> Jon Clugston <jon.clugston <at> gmail.com> writes:
> > 
> > Don't know if it will fix your problem, but you cannot just create a
> > mutex on the stack and call "lock" on it.  You must initialize it with
> > "pthread_mutex_init()".
> > 
> > Jon
> > 
> > 
> Good catch. I missed that in my haste to scrounge a sample pgm together. With or 
> w/out initializing the mutex the anomaly still occurs.

You're trying this on a 64 bit machine, right?  Call `peflags -l0' on
your executable and try again.  It should work.

This is terribly annoying.  While the executables are large address aware,
the operating system apparently is not!

What happens is that the function GetAdaptersAddresses fails, because
it's running on a thread stack in the large address area.  It doesn't
matter if the addresses given to the function are in the large address
area or not.  It's sufficent that the stack is there.  I'm not holy
myself, but this is really, really bad programming.  Grrr.

But that doesn't help, of course.  I'll try to come up with a solution.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list