summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2006-10-19 03:27:33 (GMT)
committerDavid Cole <david.cole@kitware.com>2006-10-19 03:27:33 (GMT)
commite9fb6cd51afebff3db47686ee24e65bc858b0895 (patch)
tree7c2c1a29789a23775d1d8a07360a79a5d5395573
parent4d6435f5f3d0538324796c5fad0b9e9761d364eb (diff)
downloadCMake-e9fb6cd51afebff3db47686ee24e65bc858b0895.zip
CMake-e9fb6cd51afebff3db47686ee24e65bc858b0895.tar.gz
CMake-e9fb6cd51afebff3db47686ee24e65bc858b0895.tar.bz2
BUG: Correct the SystemReportDebugHook function. It should not call exit. It gets called multiple times at shutdown in a memory leak reporting scenario... This is the source of the long standing KWWidgetsTour debug build dashboard failure.
-rw-r--r--Source/kwsys/SystemTools.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index e8e18bd..f491cbf 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -4091,12 +4091,14 @@ namespace KWSYS_NAMESPACE
static int SystemToolsDebugReport(int, char* message, int*)
{
- fprintf(stderr, message);
- exit(1);
+ fprintf(stderr, "%s", message);
+ fflush(stderr);
+ return 1; // no further reporting required
}
+
void SystemTools::EnableMSVCDebugHook()
{
- if(getenv("DART_TEST_FROM_DART"))
+ if (getenv("DART_TEST_FROM_DART"))
{
_CrtSetReportHook(SystemToolsDebugReport);
}
@@ -4109,5 +4111,3 @@ namespace KWSYS_NAMESPACE
void SystemTools::EnableMSVCDebugHook() {}
} // namespace KWSYS_NAMESPACE
#endif
-
-