From 11ddd559b2e78885c69b19409e92e947df0c4f52 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Fri, 9 Dec 2022 17:31:47 -0500 Subject: [PATCH] Fixed an error with LEF read where duplicate macros are encountered in the input. The name of one was being modified but was being right-justified into the string, resulting in a name starting with many space characters. Also: Fixed an issue with extresist where a label that ends up with an empty string can become a node with an empty string name in the .res.ext file output. --- VERSION | 2 +- lef/lefRead.c | 2 +- resis/ResMain.c | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index c9e14d03..e7081c74 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.349 +8.3.350 diff --git a/lef/lefRead.c b/lef/lefRead.c index a11efd5c..b7bd56ee 100644 --- a/lef/lefRead.c +++ b/lef/lefRead.c @@ -2028,7 +2028,7 @@ LefReadMacro(f, mname, oscale, importForeign, doAnnotate, lefTimestamp) for (suffix = 1; HashGetValue(he) != NULL; suffix++) { - sprintf(newname, "%250s_%d", mname, suffix); + snprintf(newname, 255, "%s_%d", mname, suffix); he = HashFind(&lefDefInitHash, newname); } LefError(LEF_WARNING, "Cell \"%s\" was already defined in this file. " diff --git a/resis/ResMain.c b/resis/ResMain.c index ba47a133..abbba4e1 100644 --- a/resis/ResMain.c +++ b/resis/ResMain.c @@ -282,6 +282,10 @@ ResMakeLabelBreakpoints(def, goodies) for (slab = def->cd_labels; slab != NULL; slab = slab->lab_next) { + /* Avoid any empty-string labels, or it will end up as */ + /* missing terminal on a device. */ + if (*(slab->lab_text) == '\0') continue; + entry = HashFind(&ResNodeTable, slab->lab_text); node = ResInitializeNode(entry);