X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Mon, 5 Mar 2012 11:26:05 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Bug in Windows 8 Consumer Preview affecting Cygwin Message-ID: <20120305102605.GA25993@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 Hi folks, over the weekend I tested Cygwin on the Windows 8 Consumer Preview and it basically runs. However, there's a bug in a Windows function which affects 64 bit systems when running Cygwin 1.7.10 and later. If you do a base install and then try to run ash/dash in a console window, the shells seem to hang and produce no output. In fact, they don't hang, they can just not produce any output. So, for instance, starting cmd, cd'ing into C:\cygwin\bin and then starting `ash ./rebaseall' will work. Even `ls' works, you just don't see what it prints. The problem is apparently a bug in the function WriteConsoleW. If the executable is marked as "large-address aware", which all more recently compiled Cygwin binaries are, then the Cygwin heap will be in the large address area starting at address 0x80000000 under WOW64. As it turns out, The WriteCOnsoleW function on W8CP/64 doesn't grok buffer addresses beyond 0x80000000 and returns with error 998, ERROR_INVALID_ADDRESS. That's clearly a bug, but apparently there is no offical bug reporting channel for W8 yet. Fortunately there are two workarounds: - Live with it and use mintty except for rebasing. - Remove ther large address awareness flag from executables, using the peflags -l0 option. Downside: The heap will start at 0x20000000 as on 32 bit systems. This raises the chance for DLL collisions. I hope the bug will be found and fixed before the W8 release, just as I hope that the new Metro GUI won't be forced on us in the release... For the time being I reported the bug on the W8 forum(*) but I doubt that anybody at Microsfot will find it between the other thousands of forum entries each day. Corinna (*) http://answers.microsoft.com/en-us/windows/forum/windows_8-windows_programs/bug-in-writeconsolew-call/7ffb331c-e6b6-4e81-905f-f3f38d9563a4 -- 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