This is the mail archive of the cygwin 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]
Other format: [Raw text]

Re: Anamoly with ioctl() in cygwin 1.7.10


On Mar  8 11:33, Corinna Vinschen wrote:
> 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.

Well, I think I have a solution now.  I applied a patch to CVS and
I'm just generating a new developer snapshot.  Please give the today's
snapshot from http://cygwin.com/snapshots/ a try.

Oh, and, thanks for the report and the testcase.


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


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