474177 {
474178 if (!compiled_) {
474179 if (error_info != NULL)
474180 error_info->kind = kNotCompiled;
474181 LOG(DFATAL) << "RE2::Set::Match() called before compiling";
474182 return false;
474183 }
474184#ifdef RE2_HAVE_THREAD_LOCAL
474185 hooks::context = NULL;
474186#endif
474187 bool dfa_failed = false;
474188 duckdb_base_std::unique_ptr<SparseSet> matches;
474190 matches.reset(new SparseSet(size_));
474192 }
474193 bool ret = prog_->SearchDFA(text, text, Prog::kAnchored, Prog::kManyMatch,
474194 NULL, &dfa_failed, matches.get());
474195 if (dfa_failed) {
474196 if (options_.log_errors())
474197 LOG(ERROR) << "DFA out of memory: "
474198 << "program size " << prog_->size() << ", "
474199 << "list count " << prog_->list_count() << ", "
474200 << "bytemap range " << prog_->bytemap_range();
474201 if (error_info != NULL)
474202 error_info->kind = kOutOfMemory;
474203 return false;
474204 }
474205 if (ret == false) {
474206 if (error_info != NULL)
474207 error_info->kind = kNoError;
474208 return false;
474209 }
474211 if (matches->empty()) {
474212 if (error_info != NULL)
474213 error_info->kind = kInconsistent;
474214 LOG(DFATAL) << "RE2::Set::Match() matched, but no matches returned?!";
474215 return false;
474216 }
474217 v->assign(matches->begin(), matches->end());
474218 }
474219 if (error_info != NULL)
474220 error_info->kind = kNoError;
474221 return true;
474222}