Skip to content

Commit bc67783

Browse files
authored
Merge pull request #2707 from arthurjolo/prevent_3Dmazerout_crashing
grt:change testing moment for error GRT183 heap underflow to prevent crashing
2 parents 3cc53b2 + 3990bd0 commit bc67783

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/grt/src/fastroute/src/maze3D.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -971,13 +971,6 @@ void FastRouteCore::mazeRouteMSMDOrder3D(int expand,
971971
const int remd = ind1 % (grid_hv_);
972972
const int curX = remd % x_range_;
973973
const int curY = remd / x_range_;
974-
975-
if (src_heap_3D.empty()) {
976-
logger_->error(GRT,
977-
183,
978-
"Net {}: heap underflow during 3D maze routing.",
979-
nets_[netID]->getName());
980-
}
981974
removeMin3D(src_heap_3D);
982975

983976
const bool Horizontal = (((curL % 2) - layerOrientation) == 0);
@@ -1194,6 +1187,12 @@ void FastRouteCore::mazeRouteMSMDOrder3D(int expand,
11941187
}
11951188
}
11961189

1190+
if (src_heap_3D.empty()) {
1191+
logger_->error(GRT,
1192+
183,
1193+
"Net {}: heap underflow during 3D maze routing.",
1194+
nets_[netID]->getName());
1195+
}
11971196
// update ind1 for next loop
11981197
ind1 = (src_heap_3D[0] - &d1_3D[0][0][0]);
11991198
} // while loop

0 commit comments

Comments
 (0)