Skip to content

Fix segfault in atom_cluster_noc_group_check() #2618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion vpr/src/pack/cluster_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1384,7 +1384,8 @@ bool atom_cluster_noc_group_check(AtomBlockId blk_id,
ClusterBlockId clb_index,
int verbosity,
NocGroupId& temp_cluster_noc_grp_id) {
const NocGroupId atom_noc_grp_id = g_vpr_ctx.cl_helper().atom_noc_grp_id[blk_id];
const auto& atom_noc_grp_ids = g_vpr_ctx.cl_helper().atom_noc_grp_id;
Copy link
Contributor

@vaughnbetz vaughnbetz Jun 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest a comment saying why this is necessary (some flows that just use the clustering legality check might not have this data structure alive). Can be added after CI completes / in another PR so we get this one in quickly if you like.

const NocGroupId atom_noc_grp_id = atom_noc_grp_ids.empty() ? NocGroupId::INVALID() : atom_noc_grp_ids[blk_id];

if (temp_cluster_noc_grp_id == NocGroupId::INVALID()) {
// the cluster does not have a NoC group
Expand Down