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

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

Fix segfault in atom_cluster_noc_group_check() #2618

Closed soheilshahrouz closed 5 months ago

soheilshahrouz commented 5 months 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 5 months 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 5 months ago

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