Hi.
This bug is also reported in: https://bugs.launchpad.net/ubuntu/+source/gplcver/+bug/243980
For instance, using:
$dumpfile("teste-disco.vcd"); // it creates isco.vcd
$dumpfile("disco.vcd"); // it creates isco.vcd
$dumpfile("isco.vcd"); // it creates nothing
$dumpfile("o.vcd"); // it creates nothing
This patch fixes the issue.
Hi. This patch is causing segmentation fault in other examples, such as the files in #577934. Greetings.
---end quoted text---
The bug reported in LP 243980 is what I am experiencing here (I am
on an amd64 machine). Yet the symptoms you mentioned are different,
and I am not able to reproduce it here.
Actually I realized the following:
$dumpfile("test.vcd"); // dumps to '.vcd' file
$dumpfile("test.VCD"); // dumps to '.VCD' file
$dumpfile("test"); // dumps to 'test' file
So it seems the problem is with parsing the string which contains a
dot '.'
I ran cver through the debugger, I started from src/v_ex.c(4903),
which calls __get_eval_cstr from src/v_cnv.c.
In the first case (ie. "test.vcd") the value of `__exprline' variable
after execution of line src/v_cnv.c:1721 is "\0\0\0\0.vcd" !
So for some reason, the characters before the dot are converted to
nulls !
Also the value of `xsp->xslen' is 64 after execution of line
src/v_cnv.c:1715
In the third case (ie. "test") the value of `__exprline' variable
after execution of line src/v_cnv.c:1721 is "test", and the value of
`xsp->xslen' is 32 after execution of line src/v_cnv.c:1715
I will try to investigate further
---end quoted text--- From what I mentioned in previous investigation, I think your patch seems irrelevant, as the issue doesn't seem to be about size of some datatype. As of it causing seg. faults with the files in #577943, well, the files in that other bug are causing seg. fault even without the patch.
---end quoted text---
Further tests showed me that I was wrong:
$dumpfile("test1234"); // dumps into 1234
So for some reason, it sometimes takes only the last 4 chars of the
string !
As for those tests:
$dumpfile("isco.vcd");
$dumpfile("o.vcd");
They actually dump into '.vcd' file (ie. not nothing).