diff --git a/include/sta/Search.hh b/include/sta/Search.hh index dc73d6ed..a2430809 100644 --- a/include/sta/Search.hh +++ b/include/sta/Search.hh @@ -606,6 +606,7 @@ protected: ExceptionFrom *filter_from_; ExceptionTo *filter_to_; VertexSet *filtered_arrivals_; + std::mutex filtered_arrivals_lock_; bool found_downstream_clk_pins_; PathGroups *path_groups_; VisitPathEnds *visit_path_ends_; diff --git a/search/Search.cc b/search/Search.cc index 2eefcd4a..242e05b9 100644 --- a/search/Search.cc +++ b/search/Search.cc @@ -2686,8 +2686,10 @@ Search::setVertexArrivals(Vertex *vertex, } tag_bldr->copyArrivals(tag_group, prev_arrivals, prev_paths); vertex->setTagGroupIndex(tag_group->index()); - if (tag_group->hasFilterTag()) + if (tag_group->hasFilterTag()) { + LockGuard lock(this->filtered_arrivals_lock_); filtered_arrivals_->insert(vertex); + } if (has_requireds) { requiredInvalid(vertex); @@ -2712,8 +2714,10 @@ Search::setVertexArrivals(Vertex *vertex, tag_bldr->copyArrivals(tag_group, arrivals, prev_paths); vertex->setTagGroupIndex(tag_group->index()); - if (tag_group->hasFilterTag()) + if (tag_group->hasFilterTag()) { + LockGuard lock(this->filtered_arrivals_lock_); filtered_arrivals_->insert(vertex); + } } } }