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 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: <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 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline 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 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 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