There are some cases where a call to vpi_put_value() can leak memory. There are four tests in the test suite that demonstrate this problem. In the normal vvp tests pr1476440, nb_assign and nb_delay have leaks. From the vpi tests pokevent has a leak. The attached scripts can be used to test the entire library and look for invalid results. I'm using valgrind 3.4.0. The find script looks for output with problems. To speed things up I'm not running valgrind on the compiler only the run time. To test an individual file compile as normal and then run valgrind --leak-check=full vvp a.out.
We currently only care about the definitely lost memory. We can hammer the rest down over time.
Log in to post a comment.