X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Thu, 23 Oct 2008 20:53:48 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: cygwin bash crashes on Win Serv 2008 Message-ID: <20081023185348.GT9289@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <081020144229 DOT ZM1710 AT adobe DOT com> <20081023135451 DOT GB21067 AT calimero DOT vinschen DOT de> <20081023140902 DOT GR9289 AT calimero DOT vinschen DOT de> <010e01c93525$ab77b160$9601a8c0 AT CAM DOT ARTIMI DOT COM> <20081023162033 DOT GS9289 AT calimero DOT vinschen DOT de> <011401c9352f$b0e25dd0$9601a8c0 AT CAM DOT ARTIMI DOT COM> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <011401c9352f$b0e25dd0$9601a8c0@CAM.ARTIMI.COM> User-Agent: Mutt/1.5.16 (2007-06-09) 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 Oct 23 17:52, Dave Korn wrote: > Corinna Vinschen wrote on 23 October 2008 17:21: > > Attempt to execute non-executable address 00419d97 > > > > Huh? Why should this address (this application function) be > > "non-executable", while it's executable when TS is not installed? > > DEP? ASLR? SafeSEH? As well as "dg" there are some other commands in > windbg that'll show you memory types and attributes. Huh! It was DEP. Apparently when installing TS, the default setting for DEP is switched from "Turn on DEP for essential Windows programs and services only" to "Turn on DEP for all programs and services [with execptions]". I switched it back, rebooted, and now bash, grep and GDB work fine. However, I don't understand why this happens. The address in question (419d97) is well within the .text segment: .text 401000 -> 46a510 .data 46b000 -> 46d380 As for ASLR and SafeSEH, both functions are, afaik, only enabled if you set a flag in the Windows specifc extended PE/COFF header. And there's something else I don't get. DEP is usually no problem when running apps from the Cygwin net distro. And if I enable DEP but TS is not installed, bash and friends run fine. Only the combination of TS *and* DEP results in a crash. If I exclude bash.exe explicitly, no crash in bash. Unfortunately it's not possible to exclude cygwin1.dll and then all Cygwin apps magically work. > > Could this have something to do with the executbale header gcc creates? > > Dunno - which executable header? Seems unlikely since we're in a completely > different memory page and well beyond the header area into the .text segment. I mean the flags you can set in the extended PE/COFF header. > (Actually, are we in the .text segment, or is there a thunk of some kind in > .rdata? And is the difference perhaps related to the use-or-not, or the > need-for-or-not, of ld's --{en,dis}able-runtime-pseudo-reloc options?) There is a .rdata, but the function address is in .text and it has been called by a simple call instruction from main(), also well within the .text segment. Thanks for the DEP hint. So that's the (temporary?) solution for now, don't enforce DEP on Cygwin apps when TS is installed. But it's still unclear to me why TS plus DEP would have an effect on an innocent application like bash at all. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/