In faiss/utils/distances.cpp function ‘range_search_inner_product’, the destructor of RangeSearchResultHandler will be called, then function 'RangeSearchPartialResult::merge' and function 'RangeSearchResult::do_allocation' will be executed when partial_results.size() > 0. 'RangeSearchResult::do_allocation' may throw an exception, which will cause a crash. Is this intended? If not intended, exceptions can be caught to prevent the crash as follows:
if (partial_results.size() > 0) {
RangeSearchPartialResult::merge(partial_results);
}
--->
try {
if (partial_results.size() > 0) {
RangeSearchPartialResult::merge(partial_results);
}
} catch (const FaissException& e){
// log...
}
In faiss/utils/distances.cpp function ‘range_search_inner_product’, the destructor of RangeSearchResultHandler will be called, then function 'RangeSearchPartialResult::merge' and function 'RangeSearchResult::do_allocation' will be executed when partial_results.size() > 0. 'RangeSearchResult::do_allocation' may throw an exception, which will cause a crash. Is this intended? If not intended, exceptions can be caught to prevent the crash as follows:
if (partial_results.size() > 0) {
RangeSearchPartialResult::merge(partial_results);
}
--->
try {
if (partial_results.size() > 0) {
RangeSearchPartialResult::merge(partial_results);
}
} catch (const FaissException& e){
// log...
}