From 42aa06f8f5601bb9f80e6cac31445b2996dfc6d4 Mon Sep 17 00:00:00 2001 From: "R. Timothy Edwards" Date: Wed, 22 Oct 2025 17:27:00 -0400 Subject: [PATCH] Corrected what seems to be a long-standing error in which DRCCheckThis() is called in order of top to bottom of the hierarchy when called from drcCheckFunc() although it was changed to order DRCPendingRoot from bottom to top. drcCheckFunc() then does it backwards. Fixing this appears to have resolved some weird errors with DRC errors not showing up when doing "drc check" (initially) and DRC errors disappearing when making changes to a generated cell. Appears to be okay now. --- VERSION | 2 +- drc/DRCcontin.c | 5 ++--- drc/DRCmain.c | 7 ++++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/VERSION b/VERSION index 86569582..cbcaf147 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.566 +8.3.567 diff --git a/drc/DRCcontin.c b/drc/DRCcontin.c index b24ff556..13bed738 100644 --- a/drc/DRCcontin.c +++ b/drc/DRCcontin.c @@ -203,13 +203,12 @@ DRCCheckThis (celldef, operation, area) /* Insert celldef into list of Defs waiting to be checked, unless */ /* it is already there. */ -#if (0) - /* The switch to copying up DRC errors from non-interacting */ /* child cells means that the child cells must be processed */ /* first. So this routine changes from prepending the cell */ /* to the list to appending it. */ +#if (0) pback = &DRCPendingRoot; p = DRCPendingRoot; @@ -230,8 +229,8 @@ DRCCheckThis (celldef, operation, area) } p->dpc_next = DRCPendingRoot; DRCPendingRoot = p; - #endif + /* Append new cell to check to the pending list */ if (DRCPendingRoot == NULL) { diff --git a/drc/DRCmain.c b/drc/DRCmain.c index 7f485b59..c7171dcb 100644 --- a/drc/DRCmain.c +++ b/drc/DRCmain.c @@ -737,11 +737,12 @@ drcCheckFunc(scx, cdarg) DBStdPaintTbl(TT_CHECKPAINT, PL_DRC_CHECK), (PaintUndoInfo *) NULL); - DRCCheckThis(def, TT_CHECKPAINT, (Rect *) NULL); - - /* Search children */ + /* Search children and apply recursively */ (void) DBCellSrArea(scx, drcCheckFunc, (ClientData) NULL); + /* Then do self */ + DRCCheckThis(def, TT_CHECKPAINT, (Rect *) NULL); + /* As a special performance hack, if the complete cell area is * handled here, don't bother to look at any more array elements. */