https://open-source-silicon.dev logo
#openlane
Title
# openlane
t

tnt

07/27/2020, 11:15 AM
So there is some weird string parsing going on that must be worked around using that I guess.
u

20Mhz

07/27/2020, 12:14 PM
So strange, I’ve been using that, but still crashing
t

tnt

07/27/2020, 12:19 PM
Copy code
diff --git a/commands/CmdSubrs.c b/commands/CmdSubrs.c
index 842b026..51c9223 100644
--- a/commands/CmdSubrs.c
+++ b/commands/CmdSubrs.c
@@ -899,9 +899,9 @@ cmdWindSet(window)
 
     wDef = ((CellUse *) window->w_surfaceID)->cu_def;
     if (wDef != newRootDef)
-       (void) sprintf(caption, "%s [NOT BEING EDITED]", wDef->cd_name);
+       (void) snprintf(caption, 200, "%s [NOT BEING EDITED]", wDef->cd_name);
     else {
-       (void) sprintf(caption, "%s EDITING %s", wDef->cd_name,
+       (void) snprintf(caption, 200, "%s EDITING %s", wDef->cd_name,
                newEditDef->cd_name);
 #ifdef SCHEME_INTERPRETER
         /* Add a binding to scheme variable "edit-cell" */
👀 2
It's a function of the path length ... printing variable strings in fixed size buffers ...
That patch is just a work around, obviously the name should probably be shortened with "..." if it's too long since this is for a window title ...
u

20Mhz

07/27/2020, 12:46 PM
I see it, I was so close yesterday that probably bit me…it was 2am though… thanks for the patch, testing now…
t

tnt

07/27/2020, 1:13 PM
@Tim Edwards http://people.osmocom.org/~tnt/stuff/fix-str-overflow.diff That might be a better patch for it ...
@20Mhz Does the flow complete for you now ?
u

20Mhz

07/27/2020, 1:14 PM
passed the crash, now running LVS
t

Tim Edwards

07/27/2020, 4:12 PM
@tnt (@20Mhz): I have patched the magic source with your ("better") fix. Thanks for the diff file!. . . also for debugging the error.