mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-21 00:07:36 +08:00
MEM_EXTENDED_PARAMETER consists of a 64 bit bitfield which contains the Type and the Reserved members. The former usage of designated initializer lists initialized Type, but not Reserved. Since that's not possible anymore due to a g++ 11.2 bug, Cygwin initializes the MEM_EXTENDED_PARAMETER structs explicitely. This results in a random value in Reserved, which at least VirtualAlloc2 chokes on (ERROR_INVALID_PARAMETER). Set Reserved explicitely to 0 for a fix. Fixes: bdb7991db38b ("Cygwin: workaround a g++ 11.2 initialization bug") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cygwin documentation is available on the net at https://cygwin.com You might especially be interested in https://cygwin.com/faq/faq.html#faq.programming.building-cygwin