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.

This commit is contained in:
David Cole 2006-10-18 23:27:33 -04:00
parent 4d6435f5f3
commit e9fb6cd51a

View File

@ -4091,12 +4091,14 @@ namespace KWSYS_NAMESPACE
static int SystemToolsDebugReport(int, char* message, int*) static int SystemToolsDebugReport(int, char* message, int*)
{ {
fprintf(stderr, message); fprintf(stderr, "%s", message);
exit(1); fflush(stderr);
return 1; // no further reporting required
} }
void SystemTools::EnableMSVCDebugHook() void SystemTools::EnableMSVCDebugHook()
{ {
if(getenv("DART_TEST_FROM_DART")) if (getenv("DART_TEST_FROM_DART"))
{ {
_CrtSetReportHook(SystemToolsDebugReport); _CrtSetReportHook(SystemToolsDebugReport);
} }
@ -4109,5 +4111,3 @@ namespace KWSYS_NAMESPACE
void SystemTools::EnableMSVCDebugHook() {} void SystemTools::EnableMSVCDebugHook() {}
} // namespace KWSYS_NAMESPACE } // namespace KWSYS_NAMESPACE
#endif #endif