4dd0d0b7dc
Introducing an independent Cygwin PID introduced a regression: The expectation is that the myself pinfo pointer always points to a specific address right in front of the loaded Cygwin DLL. However, the independent Cygwin PID changes broke this. To create myself at the right address requires to call init with h0 set to INVALID_HANDLE_VALUE or an existing address: void pinfo::init (pid_t n, DWORD flag, HANDLE h0) { [...] if (!h0 || myself.h) [...] else { shloc = SH_MYSELF; if (h0 == INVALID_HANDLE_VALUE) <-- !!! h0 = NULL; } The aforementioned commits changed that so h0 was always NULL, this way creating myself at an arbitrary address. This patch makes sure to set the handle to INVALID_HANDLE_VALUE again when creating a new process, so init knows that myself has to be created in the right spot. While at it, fix a potential uninitialized handle value in child_info_spawn::handle_spawn. Fixes: |
||
---|---|---|
.. | ||
CVSChangeLogs.old | ||
cygserver | ||
cygwin | ||
doc | ||
lsaauth | ||
testsuite | ||
utils | ||
CONTRIBUTORS | ||
COPYING | ||
COPYING.LIB | ||
CYGWIN_LICENSE | ||
Makefile.common | ||
Makefile.in | ||
README | ||
acinclude.m4 | ||
aclocal.m4 | ||
autogen.sh | ||
c++wrap | ||
ccwrap | ||
config.guess | ||
config.sub | ||
configure | ||
configure.ac | ||
configure.cygwin | ||
install-sh |
README
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