Skip to content

Prevent Cygwin from concealing non-abort() crashes

BIND system tests are run in a Cygwin environment. Apparently Cygwin shell sets the SEM_NOGPFAULTERRORBOX bit in its process error mode which is then inherited by all spawned child processes. This bit prevents the Windows Error Reporting dialog from being displayed, which I assume is part of an effort to contain memory handling errors triggered by Cygwin binaries in the Cygwin environment. Unfortunately, this also prevents automatic crash dump creation by Windows Error Reporting and Cygwin itself does not handle memory errors in native Windows processes spawned from a Cygwin shell.

Fix by clearing the SEM_NOGPFAULTERRORBOX bit inside named if it is started in a Cygwin environment, thus overriding the Cygwin-set process error mode in order to enable Windows Error Reporting to handle all named crashes.

Merge request reports