]> sourceware.org Git - newlib-cygwin.git/commit
Cygwin: fix initializing MEM_EXTENDED_PARAMETER
authorCorinna Vinschen <corinna@vinschen.de>
Mon, 6 Sep 2021 18:15:43 +0000 (20:15 +0200)
committerCorinna Vinschen <corinna@vinschen.de>
Mon, 6 Sep 2021 18:28:34 +0000 (20:28 +0200)
commit3d322ac930ca6d2516680fc78e3d3018cc737483
treea704828922aeb5d9eb1ca406504893e948346889
parenteeeb5650cf706f4dde72ce8b8598aef41f88718a
Cygwin: fix initializing MEM_EXTENDED_PARAMETER

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>
winsup/cygwin/miscfuncs.cc
winsup/cygwin/mmap.cc
This page took 0.026263 seconds and 5 git commands to generate.