Skip to content

Commit 067b4a9

Browse files
committed
Fix segfault while running tests on macOS
The tests run in a different order on macOS than Linux, which happens to result in this segfault. The problem is that `test_compressed_grid` leaves some stuff behind in `mutable_device().logical_block_types`, which have `pb_type` set to `nullptr`. This then breaks `test_connection_router`'s call to `XmlReadArch`, since it assumes that all of the logical block types are ones that it created, all of which either have `pb_type` set or are empty. Making `test_compressed_grid` clear `logical_block_types` when it's done fixes that.
1 parent 34e2bc6 commit 067b4a9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

vpr/test/test_compressed_grid.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,8 @@ TEST_CASE("test_compressed_grid", "[vpr_compressed_grid]") {
330330
REQUIRE(grid_loc == t_physical_tile_loc{98, 98, 0});
331331
}
332332

333+
logical_block_types.clear();
334+
333335
}
334336

335337
} // namespace

0 commit comments

Comments
 (0)