Skip to content

Commit e9544da

Browse files
authored
[DeviceSanitizer][Coverity] Fix uncaught exception issue (#17992)
`die()` would write to the logger, bringing the potential exception.
1 parent 6c291d2 commit e9544da

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

unified-runtime/source/loader/layers/sanitizer/ur_sanitizer_layer.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ context_t *getContext() {
2020
try {
2121
return context_t::get_direct();
2222
} catch (...) {
23-
die("Failed to get sanitizer context.");
23+
// Cannot write logger here as that would also introduce a potential
24+
// exception
25+
std::terminate();
2426
}
2527
}
2628

0 commit comments

Comments
 (0)