diff --git a/checkin_notes b/checkin_notes index 9a804aef8c..30bea9967e 100644 --- a/checkin_notes +++ b/checkin_notes @@ -9065,3 +9065,18 @@ David 10 Nov 2009 from Oliver Bock Makefile.am + +Rom 11 Nov 2009 + - On Windows treat all SEH exceptions as C++ style exceptions. + NOTE: I'll need to do a little more research and adjust the + diagnostics stuff later. I believe that the diagnostics + framework will now always report an unhandled C++ exception + for things like an Access Violation. + - client: On Windows, recover from an Access Violation if/when + the GPU functions access violate. + + lib/ + boinc_in.h + coproc.cpp + win_build/ + *.vcproj diff --git a/lib/boinc_win.h b/lib/boinc_win.h index f4dcc606bb..fc5c797bc8 100644 --- a/lib/boinc_win.h +++ b/lib/boinc_win.h @@ -186,6 +186,7 @@ typedef LPCSTR PCTSTR, LPCTSTR, PCUTSTR, LPCUTSTR; #include #include #include +#include #endif // Define a generic string type that can be a Unicode string on diff --git a/lib/coproc.cpp b/lib/coproc.cpp index 105d590af5..f457d35dc7 100644 --- a/lib/coproc.cpp +++ b/lib/coproc.cpp @@ -27,6 +27,7 @@ #include #include + #ifdef _WIN32 #ifndef SIM #include @@ -136,19 +137,32 @@ void COPROCS::summary_string(char* buf, int len) { strcpy(buf, bigbuf); } -#ifndef _WIN32_ + +#ifdef _WIN32 + +void COPROCS::get(bool use_all, vector&descs, vector&warnings) { + try { + COPROC_CUDA::get(*this, use_all, descs, warnings); + } catch(...) { + warnings.push_back("Caught exception in NVIDIA GPU detection"); + } + + try { + COPROC_ATI::get(*this, descs, warnings); + } catch(...) { + warnings.push_back("Caught exception in ATI GPU detection"); + } +} + +#else + jmp_buf resume; void segv_handler(int) { longjmp(resume, 1); } -#endif void COPROCS::get(bool use_all, vector&descs, vector&warnings) { -#ifdef _WIN32_ - COPROC_CUDA::get(*this, use_all, descs, warnings); - COPROC_ATI::get(*this, descs, warnings); -#else sighandler_t old_sig = signal(SIGSEGV, segv_handler); if (setjmp(resume)) { warnings.push_back("Caught SIGSEGV in NVIDIA GPU detection"); @@ -163,9 +177,10 @@ void COPROCS::get(bool use_all, vector&descs, vector&warnings) { } #endif signal(SIGSEGV, old_sig); -#endif } +#endif + // used only to parse scheduler request messages // int COPROCS::parse(FILE* fin) { diff --git a/win_build/boinc_cli.vcproj b/win_build/boinc_cli.vcproj index 05c07337bd..1715b3cc8f 100644 --- a/win_build/boinc_cli.vcproj +++ b/win_build/boinc_cli.vcproj @@ -383,6 +383,7 @@ AdditionalIncludeDirectories="../lib;../api;../client/win;../client;..;../../boinc_depends_win_vs2005/openssl/include;../../boinc_depends_win_vs2005/curl/include;../../boinc_depends_win_vs2005/zlib/include;../coprocs/cuda/include" PreprocessorDefinitions="WIN32;_WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE;_USE_CURL;USE_SSL;USE_SSLEAY;USE_OPENSSL" StringPooling="false" + ExceptionHandling="2" RuntimeLibrary="2" FloatingPointModel="2" UsePrecompiledHeader="2" diff --git a/win_build/boinc_dll.vcproj b/win_build/boinc_dll.vcproj index b92dd19274..776d945565 100644 --- a/win_build/boinc_dll.vcproj +++ b/win_build/boinc_dll.vcproj @@ -368,6 +368,7 @@ Name="VCCLCompilerTool" AdditionalIncludeDirectories="../lib" PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL;_ATL_ATTRIBUTES" + ExceptionHandling="2" RuntimeLibrary="2" FloatingPointModel="2" UsePrecompiledHeader="2" diff --git a/win_build/boinc_ss.vcproj b/win_build/boinc_ss.vcproj index f52d88ceb4..6bef9d5f0e 100644 --- a/win_build/boinc_ss.vcproj +++ b/win_build/boinc_ss.vcproj @@ -379,6 +379,7 @@ AdditionalIncludeDirectories="../api/,../lib/,../client,.." PreprocessorDefinitions="WIN32;NDEBUG;_MT;_WINDOWS;_CONSOLE" StringPooling="false" + ExceptionHandling="2" RuntimeLibrary="0" EnableFunctionLevelLinking="false" FloatingPointModel="2" diff --git a/win_build/boinccmd.vcproj b/win_build/boinccmd.vcproj index efaa35cd2f..5f8586d3d6 100644 --- a/win_build/boinccmd.vcproj +++ b/win_build/boinccmd.vcproj @@ -381,6 +381,7 @@ AdditionalIncludeDirectories="../lib/,../api/,../RSAEuro/source/,../client/win/,../client,.." PreprocessorDefinitions="WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE" StringPooling="true" + ExceptionHandling="2" RuntimeLibrary="2" EnableFunctionLevelLinking="true" FloatingPointModel="2" diff --git a/win_build/boincmgr.vcproj b/win_build/boincmgr.vcproj index 613b59fb60..58839eaba2 100644 --- a/win_build/boincmgr.vcproj +++ b/win_build/boincmgr.vcproj @@ -146,6 +146,7 @@ AdditionalIncludeDirectories="..;..\..\boinc_depends_win_vs2005\wxwidgets\include;"..\..\boinc_depends_win_vs2005\wxwidgets\mswin\$(PlatformName)\$(ConfigurationName)\lib\vc_lib\mswu";..\..\boinc_depends_win_vs2005\sqlite3\include;..\lib;..\api;..\clientgui;..\client\win;$(NOINHERIT)" PreprocessorDefinitions="WIN32;_WIN32;_NDEBUG;_WINDOWS;_MT;__WXNDEBUG__;WXNDEBUG;_UNICODE;UNICODE;wxUSE_GUI=1;$(NOINHERIT)" StringPooling="true" + ExceptionHandling="2" RuntimeLibrary="2" EnableFunctionLevelLinking="false" FloatingPointModel="2" diff --git a/win_build/boincsvcctrl.vcproj b/win_build/boincsvcctrl.vcproj index c30421cf55..efe4a2c6aa 100644 --- a/win_build/boincsvcctrl.vcproj +++ b/win_build/boincsvcctrl.vcproj @@ -389,6 +389,7 @@ AdditionalIncludeDirectories="../lib;.." PreprocessorDefinitions="WIN32;_WIN32;NDEBUG;_MT;_DLL;_WINDOWS;_CONSOLE" StringPooling="false" + ExceptionHandling="2" RuntimeLibrary="2" FloatingPointModel="2" UsePrecompiledHeader="2" diff --git a/win_build/boinctray.vcproj b/win_build/boinctray.vcproj index 753bd26fce..8b6c1b6932 100644 --- a/win_build/boinctray.vcproj +++ b/win_build/boinctray.vcproj @@ -381,6 +381,7 @@ AdditionalIncludeDirectories="../api/,../lib/,../client,.." PreprocessorDefinitions="WIN32;NDEBUG;_MT;_WINDOWS;_CONSOLE" StringPooling="false" + ExceptionHandling="2" RuntimeLibrary="0" EnableFunctionLevelLinking="false" FloatingPointModel="2" diff --git a/win_build/glut.vcproj b/win_build/glut.vcproj index 374a068dad..cc8c16d68a 100644 --- a/win_build/glut.vcproj +++ b/win_build/glut.vcproj @@ -238,6 +238,7 @@