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: SOLVED: cygwin programs hang or return STATUS_ACCESS_VIOLATION in Windows Vista/2008/7


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


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