[LVS] Reading invalid SPICE netlist silently fails
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
Research direction
Start with the netlist.read call in src/lvs/lvs/built-in-macros/_lvs_netter.rb around line 951 and the exception-raising code in src/db/db/dbNetlistSpiceReader.cc around lines 485–511. Reproduce the issue with the SPICE netlist in the report and trace how parser errors cross the C++/Ruby interface. Done means the invalid input no longer fails silently and the error is handled appropriately.
Written by the indexing model from the issue text.
Description
It seem that the LVS schematic function used to parse a spice file does not handle errors properly.
More specificaly, it seems the netlist.read call cannot fail:
Interestingly enough, exceptions are raised in the read function:
The problems seems to come from the c++/ruby interface, where exceptions generated in c++ are not caught in ruby. Unfortunately, I do not have the skills to debug this much further.
A simple way to reproduce the error is to load the following SPICE file for an LVS comparison. You will see that only the first resistor is parsed, whereas the second is not present (due to the spice parser throwing on the "&%ç%&*+£à° line
.subckt top A B sub
R1 A B
"&%ç%&*+£à°
R2 A B
.ends
- Dominant language
- C++
- Stars
- 1.2k
- Forks
- 305
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 11
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from KLayout/klayout
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
KLayout/klayout#2554 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
KLayout/klayout#2412 · 3 comments ·
Maintainers usually reply within 1 day
-
DRC functions not working properly with clip in placePossibly taken @klayoutmatthias claimed this today. Openbug
KLayout/klayout#2553 · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 50/100
Maintainers usually reply within 1 day
-
Deep DRC can miss violations when a cell has many shapesMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 4/5 3-5 days Newbie friendliness 52/100
KLayout/klayout#2546 · 5 comments ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
LaneDibello/Kotor-Patch-Manager#375 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day