X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Fri, 15 Jan 2010 11:15:19 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: SOLVED: cygwin programs hang or return STATUS_ACCESS_VIOLATION in Windows Vista/2008/7 Message-ID: <20100115101519.GE22230@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <4B4F9725 DOT 3050901 AT dm2 DOT com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B4F9725.3050901@dm2.com> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Jan 14 14:13, Seth Wegner wrote: > No action or response requested, this is for the next hapless googler. > > If Windows DEP is set to "Turn on DEP for all programs and services > except those I select" certain cygwin-dependent exe files (in my > case, ssh.exe) will hang or return errors. The solution is to > either select those programs as DEP-safe or disable DEP. Works fine for me on W7 and Windows 2008. The only know problem related to this setting is if Terminal Services (TS) are installed on your 200X Server machine. In this case you can "heal" it by switching off DEP. But the actual problem is that Cygwin executables are not marked as TS-aware. That's a bit in the PE/COFF header, which isn't set by gcc, unless you use the latest gcc-4 release to build your applications. If the TS-aware fkag is not set, Windows loads a special DLL very early at process startup which is supposed to check the application for some sort of compatibility. While doing that, it potentially breaks the application by setting page protection flags to invalid values. I filed a service request at Microsoft, but the proble won't get fixed since there is a solution. The solution is to set the TS-aware bit in the executable. You can do that with a tool from the rebase package: peflags --tsaware=true your_application.exe 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