From e821381900d49e8adf10f858f1bd77558d6d3505 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Mon, 30 Sep 2024 22:11:53 -0400 Subject: [PATCH] Corrected a rather obscure error in which an otherwise unconnected port-to-port short (formed by "assign" in verilog or zero-valued resistors in SPICE) does not get checked when counting nodes before adding a proxy pin to a subcircuit in that cell, causing the proxy pin to be assigned the same node number and forming an unintended connection to the port-to-port connecting net. --- VERSION | 2 +- base/netcmp.c | 2 +- base/objlist.c | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 7e1a2b8..7aee4d0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.5.278 +1.5.279 diff --git a/base/netcmp.c b/base/netcmp.c index 0c40f97..34e7296 100644 --- a/base/netcmp.c +++ b/base/netcmp.c @@ -7360,7 +7360,7 @@ struct nlist *addproxies(struct hashlist *p, void *clientdata) // Count the largest node number used in the cell maxnode = -1; for (ob = ptr->cell; ob; ob = ob->next) - if (ob->type >= FIRSTPIN || ob->type == NODE) + if (ob->type >= FIRSTPIN || ob->type == NODE || ob->type == PORT) if (ob->node >= maxnode) maxnode = ob->node + 1; numnodes = maxnode; diff --git a/base/objlist.c b/base/objlist.c index 2ab00b4..b7d3567 100644 --- a/base/objlist.c +++ b/base/objlist.c @@ -224,6 +224,13 @@ int matchnocase(char *st1, char *st2) char *sp1 = st1; char *sp2 = st2; + /* In case of a property that does not exist in one netlist, matchnocase() + * may be passed a null value, so return 0 to indicate a non-match. + * *Both* values null will also be treated as a mismatch (debatable + * behavior). + */ + if (!sp1 || !sp2) return 0; + while (*sp1 != '\0' && *sp2 != '\0') { if (to_lower[*sp1] != to_lower[*sp2]) break; sp1++;