Merge pull request #35 from antmicro/59336-fix-filtered-arrivals-race

Guarded insertion into filtered_arrivals_ in sta::Search
This commit is contained in:
Parallax Support 2024-06-10 16:32:52 -07:00 committed by GitHub
commit d9b28d03ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -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_;

View File

@ -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);
}
}
}
}