verilog-to-routing / vtr-verilog-to-routing

Verilog to Routing -- Open Source CAD Flow for FPGA Research
https://verilogtorouting.org
Other
979 stars 378 forks source link

Fix segfault in atom_cluster_noc_group_check() #2618

Closed soheilshahrouz closed 1 week ago

soheilshahrouz commented 1 week ago

g_vpr_ctx.cl_helper().atom_noc_grp_id is not initialized when try_pack() is not called. This causes a segfault when re-clustering API is used as atom_cluster_noc_group_check() tries to access an uninitialized vector. This PR fixes this problem by check whether the vector is initilzided.

vaughnbetz commented 1 week ago

Thanks for the fast action @soheilshahrouz .
Tagging @KA7E as she has a dependency on this one. Do we have any NoC checks in the fast to run tests (vtr_strong etc.)? This has already passed the fast checks, which is good, but I'm not sure if we have a (tiny) NoC test in those ones. If not it would be good to add one @soheilshahrouz (in another PR) so we have a very fast NoC test.

vaughnbetz commented 1 week ago

Merging since CI passed, but I still think this should have a comment added @soheilshahrouz