Catch std::except in fuzz tests (#4610)

Fuzz tests must catch all expected exceptions from IE. IE is using C++ std
library which may raise standard exceptions which IE pass through.
This commit is contained in:
Andrey Somsikov
2021-03-06 13:06:40 +03:00
committed by GitHub
parent 84cd802ca5
commit 7f8d3aa638

View File

@@ -38,7 +38,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
try {
InferenceEngine::Core ie;
InferenceEngine::CNNNetwork network = ie.ReadNetwork(net, weights_blob);
} catch (const InferenceEngine::details::InferenceEngineException& error) {
} catch (const std::exception&) {
return 0; // fail gracefully on expected exceptions
}