From d0e38df6bf11fcc424a7352006152fca02cb9b2a Mon Sep 17 00:00:00 2001 From: "R. Timothy Edwards" Date: Fri, 24 Apr 2026 11:21:15 -0400 Subject: [PATCH] Fixed an error introduced in the last commit (which has been in the code now for 10 days). The last commit fixed an error when using drcCanonicalMaxwidth() multiple times in DRC rule checks on a single edge. At the time, I also added a method to save some drcCanonicalMaxwidth() results to prevent needlessly re-doing the same (potentially expensive) computation over and over. However, where I reused the cached result, I did not check if the number of entries is zero. Other code does not check the number of entries and depends on the prior behavior that drcCanonicalMaxwidth() returns NULL when there are no entries. So the code needed to check if the number of entries is zero before re-using the cached result. Without the fix, any time the caching is used, the last computed maximum area rectangle will be made active even when the current check area does not meet the area requirement, resulting in many false positive errors. --- VERSION | 2 +- doc/html/commands.html | 59 +++++++++++++++++++++++------------------- drc/DRCbasic.c | 8 +++--- 3 files changed, 37 insertions(+), 32 deletions(-) diff --git a/VERSION b/VERSION index f9f294c7..ee16f1e6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.637 +8.3.638 diff --git a/doc/html/commands.html b/doc/html/commands.html index d3fd88bf..06bdbc73 100644 --- a/doc/html/commands.html +++ b/doc/html/commands.html @@ -334,23 +334,23 @@ undo - units updatedisplay + version - version view windowborder + windowcaption - windowcaption windownames windowscrollbars + xview - xview zoom tk_path_name + @@ -367,7 +367,7 @@ antennacheck - array + archive array box @@ -402,28 +402,28 @@ deletecommandentry + display down drc - dump + drop + dump edit + + element erase + expand - expand ext ext2sim + ext2spice - ext2spice extract extresist - - - exttosim - exttospice feedback @@ -462,77 +462,82 @@ load + locking maketoolbar - move measure + move openwrapper paint - path + path peekbox plot - plow + plow polygon popbox - popstack + popstack port promptload - promptsave + promptsave property pushbox - pushstack + pushstack + readspice render3d + + resumeall rotate + route - route save scalegrid + search - search see select + setlabel (version 8.0) - setlabel (version 8.0) shell sideways + snap - snap spliterase splitpaint + startup - startup straighten stretch + suspendall - suspendall tag tech + techmanager - techmanager tool (non-Tcl version) tool (Tcl version) + unexpand - unexpand + units unmeasure upsidedown @@ -543,7 +548,7 @@ xload - + xor diff --git a/drc/DRCbasic.c b/drc/DRCbasic.c index d23dbe81..8c97c866 100644 --- a/drc/DRCbasic.c +++ b/drc/DRCbasic.c @@ -768,7 +768,6 @@ drcTile (tile, dinfo, arg) int edgeX = LEFT(tile); firsttile = TRUE; - mrd = NULL; for (tpleft = BL(tile); BOTTOM(tpleft) < top; tpleft = RT(tpleft)) { /* Get the tile types to the left and right of the edge */ @@ -858,6 +857,7 @@ drcTile (tile, dinfo, arg) } DRCstatRules++; + if (!triggered) mrd = NULL; if (cptr->drcc_flags & DRC_AREA) { @@ -895,7 +895,7 @@ drcTile (tile, dinfo, arg) mrd = drcCanonicalMaxwidth(tile, GEO_EAST, arg, cptr, &mrdcache[2]); else - mrd = mrdcache[1]; + mrd = (mrdcache[1]->entries == 0) ? NULL : mrdcache[1]; triggered = 0; } if (!trigpending || (DRCCurStyle->DRCFlags @@ -1227,7 +1227,6 @@ drcTile (tile, dinfo, arg) /* Go right across bottom of tile */ firsttile = TRUE; - mrd = NULL; for (tpbot = LB(tile); LEFT(tpbot) < right; tpbot = TR(tpbot)) { /* Get the tile types to the top and bottom of the edge */ @@ -1318,6 +1317,7 @@ drcTile (tile, dinfo, arg) } DRCstatRules++; + if (!triggered) mrd = NULL; /* top to bottom */ @@ -1350,7 +1350,7 @@ drcTile (tile, dinfo, arg) mrd = drcCanonicalMaxwidth(tile, GEO_NORTH, arg, cptr, &mrdcache[2]); else - mrd = mrdcache[1]; + mrd = (mrdcache[1]->entries == 0) ? NULL : mrdcache[1]; triggered = 0; } if (!trigpending || (DRCCurStyle->DRCFlags