From a84faabdb048b3a43cd51891711f643734e88e48 Mon Sep 17 00:00:00 2001 From: Cary R Date: Fri, 25 Sep 2009 11:45:04 -0700 Subject: [PATCH 1/2] A real wire needs an explicit initial value. To keep valgrind happy we need to give real wires an explicit initial value of 0.0. --- vvp/vvp_net_sig.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/vvp/vvp_net_sig.cc b/vvp/vvp_net_sig.cc index 766f47899..50a5edb79 100644 --- a/vvp/vvp_net_sig.cc +++ b/vvp/vvp_net_sig.cc @@ -911,6 +911,7 @@ vvp_vector4_t vvp_wire_vec8::vec4_value() const } vvp_wire_real::vvp_wire_real() +: bit_(0.0) { } From 1c8a1bbf7f6ca65d9b0754dcdb62dec4d2e9f2a7 Mon Sep 17 00:00:00 2001 From: Cary R Date: Fri, 25 Sep 2009 11:46:02 -0700 Subject: [PATCH 2/2] Clean up a couple of memory leaks in the new net rework code. This patch fixes a couple of minor memory leaks in the new net rework code. --- vvp/words.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vvp/words.cc b/vvp/words.cc index cd01a2e73..f34d596a4 100644 --- a/vvp/words.cc +++ b/vvp/words.cc @@ -298,6 +298,7 @@ static void __compile_net(char*label, msb, lsb, array_addr, signed_flag, net8_flag, local_flag); resolv_submit(res); + free(argv); return; } assert(node); @@ -305,6 +306,7 @@ static void __compile_net(char*label, __compile_net2(node, array, label, name, msb, lsb, array_addr, signed_flag, net8_flag, local_flag); + free(argv[0].text); free(argv); }