[Magic-dev] Tech file segfaults

R. Timothy Edwards tim.edwards at multigig.com
Tue Oct 9 23:48:02 EDT 2007


Dear Viet,

I'm now catching up on postings I never received, and found that
this one was never properly answered.  Better late than never.
So here goes:

 > Magic segfaults on my techfile. In the cifoutput section, if
 > I move "style cifdrc" and everything for that style above
 > "style normal" magic will run.  Or if it is just "style
 > cifdrc" by itself magic will run. It is only when "style
 > cifdrc" is at the end of the cifoutput section does it
 > segfault. Is this a bug or is my techfile messed up?

This goes back to a modification I made several years ago when I
was trying to figure out why Magic would soak up so much main memory
on startup before it even got around to loading a layout.  It turned
out that one of the main offenders was a slew of arrays created for
every cifinput, cifoutput, extract, and DRC style defined in the
techfile.  This became an obvious target for saving memory:  Remember
only the names of all the styles, and only keep one in memory at any
one time.

The problem with "cifdrc" is that if it refers to the first defined
style, then there is no problem, because all the data arrays for that
style are properly defined.  If it refers to a style after the first
one, then it attempts to access an undefined space and crashes.  I
(perhaps unadvisedly) removed all the code for "cifdrc" from version
7.5 to prevent fatal crash conditions.

I was not aware that the "cifdrc" was used so much and will make some
attempt to fix the crash condition, probably by some method like
disabling that part of the DRC whenever the cifoutput style it refers
to is not active.

					---Tim

+--------------------------------+-------------------------------------+
| Dr. R. Timothy Edwards (Tim)   | email: tim.edwards at multigig.com     |
| MultiGiG, Inc.                 | web:   http://www.multigig.com      |
| 100 Enterprise Way, Suite A-3  | phone: (831) 621-3283               |
| Scotts Valley, CA 95066        | cell:  (240) 401-0616               |
+--------------------------------+-------------------------------------+



More information about the magic-dev mailing list