Closed chaufe closed 1 year ago
@chaufe : Good catch. I'll make the fix right away.
@chaufe : I determined that basically all instances of Lookup() in lefRead.c and defRead.c should be changed to LookupFull(), since Lookup() is, as you point out, only appropriate for command-line parsing within magic's interpreter. I have fixed this in the code source on opencircuitdesign.com (magic version 8.3.425).
Thanks for the quick fix - tested to be working using magic version 8.3.425.
defRead.c uses function Lookup() for DEF token processing. Lookup() does not only match tokens out of a predefined list of keywords if the match exactly, but also matches tokens that are an abbreviation of keywords as long as the abbreviation is unique. This results in magic supporting DEF files with syntax issues without errors being reported:
Example:
This code at line 1031 (function
void DefReadNets(...)
is supposed to parse net wiring statements. Instead of+ ROUTED
, it would also support+ ROU
etc. Switching from Lookup() to LookupFull() would fix this.Normally, being tolerant on DEF file syntax errors should not be a problem, but in this case, magic just silently exits if a special net containing multiple
+ FIXED
segments will be read-in as a net with one+ FIXED
segment and the follow-up+ FIXED
being read-in as+ FIXEDBUMP
due to this keyword table at line 107 (functionDefAddRoutes
);Example code to trigger the issue:
If the line containing the second
+ FIXED
statements is removed, magic will complain about the second+ ROUTED
. Otherwise, it will just silently exit./cc @proppy /cc @dhaentz1