Tim Edwards
08/11/2020, 1:20 PMgdb /usr/local/lib/magic/tcl/magicdnull
followed by (on the gdb command line) run -- -noconsole -dnull -rcfile /openLANE_flow/designs/spm/runs/06-08_21-36/tmp/magic_antenna.magicrc /openLANE_flow/designs/spm/runs/06-08_21-36/tmp//magic_antenna.tcl
. When it crashes, it returns to the gdb prompt, where you can run bt
to see the stack.yrrapt
08/11/2020, 1:25 PMtnt
08/11/2020, 1:47 PMyrrapt
08/11/2020, 1:49 PMyrrapt
08/11/2020, 6:38 PM#0 memcpy () at ../sysdeps/x86_64/memcpy.S:513
#1 0x00007f70b8a6e2a0 in dbcConnectFunc (tile=0x7f70bc914518, cx=0x7ffdc7e478e0) at DBconnect.c:958
#2 0x00007f70b8a904ac in DBSrPaintArea (hintTile=0x0, plane=0x1f55960, rect=0x7ffdc7e479a0, mask=0x7f70b9729440, func=0x7f70b8a6dd05 <dbcConnectFunc>, arg=140727957092576) at DBtiles.c:439
#3 0x00007f70b8a686e3 in dbCellPlaneSrFunc (scx=0x7ffdc7e47990, fp=0x7ffdc7ebcf50) at DBcellsrch.c:264
#4 0x00007f70b8a6a050 in dbCellSrFunc (use=0x20c1be0, cxp=0x7ffdc7ebce30) at DBcellsrch.c:1165
#5 0x00007f70b8a68404 in DBSrCellPlaneArea (plane=0xded2d0, rect=0x7ffdc7ebd560, func=0x7f70b8a69c37 <dbCellSrFunc>, arg=140727957573168) at DBcellsrch.c:91
#6 0x00007f70b8a69c1d in DBCellSrArea (scx=0x7ffdc7ebd550, func=0x7f70b8a68527 <dbCellPlaneSrFunc>, cdarg=140727957573456) at DBcellsrch.c:1117
#7 0x00007f70b8a68723 in dbCellPlaneSrFunc (scx=0x7ffdc7ebd550, fp=0x7ffdc7ebcf50) at DBcellsrch.c:275
#8 0x00007f70b8a684b4 in DBTreeSrTiles (scx=0x7ffdc7ebd550, mask=0x7f70b9729440, xMask=0, func=0x7f70b8a6dd05 <dbcConnectFunc>, cdarg=140727957574656) at DBcellsrch.c:174
#9 0x00007f70b8a6e4ea in DBTreeCopyConnect (scx=0x7ffdc7ebd550, mask=0x7f70b97292a0, xMask=0, connect=0x7f70b97290a0, area=0x7f70b8e70960, doLabels=0 '\000', destUse=0x1b092a0) at DBconnect.c:1070
#10 0x00007f70b8bce7c7 in antennacheckVisit (dev=0xc341e0, hc=0x7ffdc7ebd720, scale=1, trans=0x7ffdc7ebd670, editUse=0x1e3b130) at EFantenna.c:507
#11 0x00007f70b8bccfcc in efVisitDevs (hc=0x7ffdc7ebd720, ca=0x7ffdc7ebd830) at EFvisit.c:324
#12 0x00007f70b8bc92e4 in efHierSrUses (hc=0x7f70b990bee0, func=0x7f70b8bcceae <efVisitDevs>, cdata=140727957575728) at EFhier.c:92
#13 0x00007f70b8bccf05 in efVisitDevs (hc=0x7f70b990bee0, ca=0x7ffdc7ebd830) at EFvisit.c:309
#14 0x00007f70b8bcceac in EFVisitDevs (devProc=0x7f70b8bcdf05 <antennacheckVisit>, cdata=31699248) at EFvisit.c:280
#15 0x00007f70b8bcde26 in CmdAntennaCheck (w=0xd6a890, cmd=0xd96b00) at EFantenna.c:238
#16 0x00007f70b8b17eba in WindExecute (w=0xd6a890, rc=9271184, cmd=0xd96b00) at windMain.c:414
#17 0x00007f70b8a9c2cb in DBWcommands (w=0xd6a890, cmd=0xd96b00) at DBWprocs.c:598
#18 0x00007f70b8b149e1 in WindSendCommand (w=0xd6a890, cmd=0xd96b00, quiet=1 '\001') at windSend.c:263
#19 0x00007f70b8b0cd19 in TxTclDispatch (clientData=0x0, argc=1, argv=0x84bc20, quiet=1 '\001') at txCommands.c:1180
#20 0x00007f70b8c159db in _tcl_dispatch (clientData=0x0, interp=0x84a850, argc=1, argv=0x84bc20) at tclmagic.c:400
#21 0x00007f70bc16e9ff in TclInvokeStringCommand () from /usr/lib64/libtcl8.5.so
#22 0x00007f70bc16fa63 in ?? () from /usr/lib64/libtcl8.5.so
#23 0x00007f70bc17052f in ?? () from /usr/lib64/libtcl8.5.so
#24 0x00007f70bc1dce61 in Tcl_FSEvalFileEx () from /usr/lib64/libtcl8.5.so
#25 0x00007f70bc1dcf9f in Tcl_EvalFile () from /usr/lib64/libtcl8.5.so
#26 0x00007f70b8b5bdbf in mainInitFinal () at main.c:1164
#27 0x00007f70b8c16458 in _magic_startup (clientData=0x0, interp=0x84a850, argc=1, argv=0x84b7f0) at tclmagic.c:725
#28 0x00007f70bc16e9ff in TclInvokeStringCommand () from /usr/lib64/libtcl8.5.so
#29 0x00007f70bc16fa63 in ?? () from /usr/lib64/libtcl8.5.so
#30 0x00007f70bc17052f in ?? () from /usr/lib64/libtcl8.5.so
#31 0x00007f70bc1dce61 in Tcl_FSEvalFileEx () from /usr/lib64/libtcl8.5.so
#32 0x00007f70bc1dcf9f in Tcl_EvalFile () from /usr/lib64/libtcl8.5.so
#33 0x00007f70bc1e2aa0 in Tcl_SourceRCFile () from /usr/lib64/libtcl8.5.so
#34 0x00007f70bc1e30f0 in Tcl_Main () from /usr/lib64/libtcl8.5.so
#35 0x000000000040080b in main (argc=7, argv=0x7ffdc7ebea18) at magicdnull.c:49
Tim Edwards
08/11/2020, 7:50 PMnewlist = (conSrArea *)mallocMagic((size_t)(csa2->csa2_size) * sizeof(conSrArea));
memcpy((void *)newlist, (void *)csa2->csa2_list, (size_t)lastsize * sizeof(conSrArea));
freeMagic((char *)csa2->csa2_list);
My immediate question is what are the values "newlist" and "lastsize". My guess is that the design was big enough that "newsize" hit the limit of an integer to hold the value and that it needs to be changed to a 64 bit "long" integer. What is the size (WxL dimension) of the design you were running this on?yrrapt
08/11/2020, 8:08 PMprint 'DBconnect.c'::dbcConnectFunc:
which prints the function information but if I try print 'DBconnect.c'::dbcConnectFunc::newlist
I just get No symbol "newlist" in specified context.
yrrapt
08/11/2020, 8:11 PM$4 = (conSrArea *) 0x21d8600
and lastsize is 67108864
yrrapt
08/11/2020, 8:12 PMsizeof(conSrArea)
is coming out at 32 so will only add another 5 bitsTim Edwards
08/11/2020, 8:18 PMTim Edwards
08/11/2020, 8:20 PMyrrapt
08/11/2020, 8:21 PMTim Edwards
08/11/2020, 8:22 PMTim Edwards
08/11/2020, 8:23 PMTim Edwards
08/11/2020, 8:30 PMTim Edwards
08/11/2020, 8:47 PM#define MallocRoutine(a) Tcl_Alloc(a)
#define FreeRoutine(a) Tcl_Free(a)
to:
#define MallocRoutine(a) malloc(a)
#define FreeRoutine(a) free(a)
I think this will work without problems. I do not believe there is any mixing of Tcl and non-Tcl memory allocation and freeing in the code.Tim Edwards
08/11/2020, 8:53 PM