#503 iverilog segfaults on empty parameter qualifier

v0.8
closed-works-for-me
nobody
5
2014-08-17
2008-09-12
Anonymous
No

Here's a simple example that crashes iverilog v0.8.6 on Debian GNU/Linux: (apologies if the HTML tags are escaped)

<blockquote><verbatim>
module and2(a,b,y);
parameter something = 12;
input a,b;
output y;
wire a,b,y;

assign y = a & b;

endmodule

module testbench;
reg a,b;
wire y;

and2 \#\(\) dut\(.a\(a\), .b\(b\), .y\(y\)\);

endmodule
</verbatim></blockquote>

Note that there's an empty parameter qualifier when 'and2' is instantiated. Compiling this example causes a segfault:

<blockquote><verbatim>
$ iverilog -o foo2 foo2.v
sh: line 1: 9079 Done /usr/lib/ivl/ivlpp -L -D__ICARUS__=1 -f/tmp/ivrlg3f20e687
9080 Segmentation fault | /usr/lib/ivl/ivl -C/tmp/ivrlh3f20e687 -C/usr/lib/ivl/vvp.conf -- -
</verbatim></blockquote>

If and2 is instantiated as follows instead,

<blockquote><verbatim>
and2 #(.something(14)) dut(.a(a), .b(b), .y(y));
</verbatim></blockquote>

...everything is just fine. Probably a trivial parser bug to fix.

best,
Graeme Smecher (gsmecher blat ece dot ubc dot ca)

Discussion

  • Cary R.

    Cary R. - 2008-09-12

    FYI this does not crash using the development branch, so it is a 0.8 specific bug. 0.8 is low priority right now, but we do fix bugs like this from time to time if they are not too intrusive.

     
  • Cary R.

    Cary R. - 2008-09-12
    • status: open --> closed-works-for-me
     
  • Cary R.

    Cary R. - 2008-09-12

    I tested this using the latest 0.8 from git and everything works fine, so it appears this bug is already fixed. You can get either the latest stable or development version from git or look at one of the development snapshots.

     

Log in to post a comment.