From df4ec3ab32a0cc0dc7b370e956d77a21a5c1e356 Mon Sep 17 00:00:00 2001 From: "R. Timothy Edwards" Date: Wed, 6 May 2026 10:21:35 -0400 Subject: [PATCH] Corrects an error that can cause "extresist" to segfault. This is due to moving away from using the node "location" in favor of a drivepoint specified by a port or other connection point. The "location" record can end up at the default value of "infinity", and should not be used to set the area for searches. This fix is in response to issue #502 on the github issue tracker, submitted by Julian Schwarz. --- VERSION | 2 +- resis/ResMain.c | 23 ++++++++++++++++++----- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/VERSION b/VERSION index ee16f1e6..d15f068e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.638 +8.3.639 diff --git a/resis/ResMain.c b/resis/ResMain.c index 96719df6..6b8af42f 100644 --- a/resis/ResMain.c +++ b/resis/ResMain.c @@ -1054,11 +1054,24 @@ ResExtractNet(node, resisdata, cellname) /* Copy Paint */ - scx.scx_area.r_ll.p_x = node->location.p_x - 2; - scx.scx_area.r_ll.p_y = node->location.p_y - 2; - scx.scx_area.r_ur.p_x = node->location.p_x + 2; - scx.scx_area.r_ur.p_y = node->location.p_y + 2; - startpoint = node->location; + /* If the node location is INFINITY, then use the rs_bbox */ + + if ((node->location.p_x == INFINITY) || (node->location.p_y == INFINITY)) + { + scx.scx_area.r_ll.p_x = node->rs_bbox.r_xbot; + scx.scx_area.r_ll.p_y = node->rs_bbox.r_ybot; + scx.scx_area.r_ur.p_x = node->rs_bbox.r_xtop; + scx.scx_area.r_ur.p_y = node->rs_bbox.r_ytop; + startpoint = node->drivepoint; + } + else + { + scx.scx_area.r_ll.p_x = node->location.p_x - 2; + scx.scx_area.r_ll.p_y = node->location.p_y - 2; + scx.scx_area.r_ur.p_x = node->location.p_x + 2; + scx.scx_area.r_ur.p_y = node->location.p_y + 2; + startpoint = node->location; + } /* Because node->type might come from a label with a sticky type * that does not correspond exactly to the layer underneath, include