Skip to content

Commit b081c36

Browse files
authored
[SYCL] Fix uncaught exception reported by analysis (#15448)
This PR fixes the uncuahgt exception in dllMain() reported by static analysis tool by adding a try-catch block.
1 parent 2fd879e commit b081c36

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

sycl/source/detail/global_handler.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,12 @@ extern "C" __SYCL_EXPORT BOOL WINAPI DllMain(HINSTANCE hinstDLL,
381381
// release.
382382
#endif
383383

384-
shutdown_win();
384+
try {
385+
shutdown_win();
386+
} catch (std::exception &e) {
387+
__SYCL_REPORT_EXCEPTION_TO_STREAM("exception in shutdown_win", e);
388+
return FALSE;
389+
}
385390
break;
386391
case DLL_PROCESS_ATTACH:
387392
if (PrintUrTrace)

0 commit comments

Comments
 (0)