delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/04/27/03:37:50

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Fri, 27 Apr 2012 09:36:59 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: peflags warning and tsaware flags
Message-ID: <20120427073659.GK25385@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <loom DOT 20120426T170854-952 AT post DOT gmane DOT org> <20120426195724 DOT GC28119 AT calimero DOT vinschen DOT de> <87d36uz195 DOT fsf AT Rainer DOT invalid> <4F9A0DE4 DOT 7040008 AT cygwin DOT com> <87ty054szm DOT fsf AT Rainer DOT invalid>
MIME-Version: 1.0
In-Reply-To: <87ty054szm.fsf@Rainer.invalid>
User-Agent: Mutt/1.5.21 (2010-09-15)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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 Apr 27 07:57, Achim Gratz wrote:
> Larry Hall (Cygwin) writes:
> > Does this help?
> 
> Thanks, I've been reading this before.  Tentatively I concluded that all
> Cygwin executables should have the +tsaware set, I just wanted to make
> sure that there aren't some that I would break if I do this.

To the contrary.  Originally we didn't care for the tsaware flag at all,
up to the point when we encountered that bash just crashed on a
TS-enabled 2008 Server.

After some debugging I found that, on a TS-enabled machine, the system
loads an additional DLL if an application is not marked as tsaware.  I
don't know what this DLL is doing exactly, but apparently it performs
certain tests on the executable to search for possible incompatibilities
of an application and then changes the system behaviour to match the
application's (or the system's) expectations.

Unfortunately it turned out that the DLL could also leave the process in
a broken state.  In case of bash it changed the page protection of parts
of the .text segment to non-executable, which then resulted in a SEGV.
I opened a support case at Microsoft, but it has been rejected.

So, adding the tsaware flag to Cygwin executables might not help, but
should never hurt.


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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019