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]

Bug in Windows 8 Consumer Preview affecting Cygwin


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


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