X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Thu, 8 Mar 2012 17:16:13 +0100
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Anamoly with ioctl() in cygwin 1.7.10
Message-ID: <20120308161613.GY5159@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <CALAQL3J43=MA-fFHSd-VVyuJ_n1cpAuEQ1zpxvrRDXptQk8sSQ@mail.gmail.com> <CAG_2cTm5JXFsiK0MaUQr36pxVFNeAmsNpGTo65q9inRB=U5e4w@mail.gmail.com> <loom.20120308T023115-96@post.gmane.org> <20120308103354.GU5159@calimero.vinschen.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <20120308103354.GU5159@calimero.vinschen.de>
User-Agent: Mutt/1.5.21 (2010-09-15)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

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

