newlib-cygwin/winsup
Jon Turney a30cd7a5b9
Cygwin: Remove waitloop argument from try_to_debug()
Currently, when using CYGWIN's error_start facility, the faulting
process isn't stopped while the error_start process is started when the
fault is caused by an exception. (it even seems possible in theory that
the faulting process could have exited before the error_start process
attaches).

This leads to e.g. the core dump written by CYGWIN='error_start=dumper'
in response to an exception being non-deterministic.

Remove the waitloop argument from try_to_debug(), only used in the
exception case, so the faulting process busy-waits until the error_start
process attaches.

Code archaeology to determine why the code is this way didn't really
turn up any answers, but this seems a low-risk change, as this only
changes the behaviour when:

 - a debugger isn't already attached
 - an error_start is specified in CYGWIN env var
 - an exception has occurred which will be translated to a signal

If error_start invokes something which doesn't attach using
DebugActiveProcess(), we will spin indefinitely, but that will also
currently occur for any of the existing other uses of try_to_debug(),
which default to waitloop=TRUE.
2020-08-30 16:24:47 +01:00
..
CVSChangeLogs.old
cygserver Cygwin: cygserver: build with -Wimplicit-fallthrough=5 2020-08-07 13:40:13 -04:00
cygwin Cygwin: Remove waitloop argument from try_to_debug() 2020-08-30 16:24:47 +01:00
doc Cygwin: Add Cygwin 3.2 release info 2020-08-30 14:27:43 +02:00
lsaauth
testsuite Use remove-advertising-clause script to edit BSD licenses 2020-01-29 19:03:31 +01:00
utils Cygwin: strace: ignore GCC exceptions 2020-08-20 10:48:48 -04:00
CONTRIBUTORS Cygwin: Add David Macek to CONTRIBUTORS 2020-04-21 10:39:36 +02:00
COPYING
COPYING.LIB
CYGWIN_LICENSE
Makefile.common
Makefile.in
README
acinclude.m4
aclocal.m4
autogen.sh
c++wrap
ccwrap
config.guess
config.sub
configure Cygwin: seteuid: disable unused funcs and lsaauth subdir 2019-01-28 10:24:18 +01:00
configure.ac Cygwin: seteuid: disable unused funcs and lsaauth subdir 2019-01-28 10:24:18 +01:00
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