[Ns-developers] Idiotic question about the callbacks

Gustavo Carneiro gjcarneiro at gmail.com
Sun Mar 18 04:27:45 PDT 2012

On Sun, Feb 26, 2012 at 02:27, John Abraham <jabraham3 at mail.gatech.edu>wrote:

> The valgrind errors seem to vary both intra-OS (Ubuntu 10 vs 11) and
> inter-OS (Ubuntu vs Fedora), which sometimes made me question the use of
> valgrind. Still it used by a lot of people.
> Throughout last year while being involved with  various ns-3 builds, I
> have seen that , now, only Fedora systems can completely "PASS" ns-3 passed
> through valgrind,  in this generation of gcc.
> I also raised the issue with Tom, that we need to ensure that at least
> Fedora systems can validate ns-3 with valgrind or pretty soon we will have
> no releases that can pass valgrind.
> As, very often, ns-3 is used for simulations that last for hours even
> days, valgrind checks for leaks becomes crucial.
> Ubuntu systems report valgrind errors for ns-3 in a variety of places
> especially in third-party libraries like libpixman or libselinux. The
> errors range from leaks to unreachable code to still reachable memory or
> unconditional jumps. And the Mac, I don't even want to go there. OSX-lion
> is quite a challenge.
> I understand the pain in using valgrind. And I would also admit, I don't
> have the ability to narrow down the root-cause of the valgrind errors. I've
> spent hours on it. Very cryptic and one can only guess.

I think we have to be able to distinguish between valgrind errors in ns-3
code itself and valgrind errors in 3rd party libraries.  The former I think
are important to detect and fix, the latter are just noise and out of our

To avoid valgrind errors in 3rd party libraries, we might want to build
ns-3 without linking to those libraries.  Gtk+, for instance, is linked to
by default unless it is not found.  We may need to add a --disable-gtk
option.  Same for the other libraries.

The remaining valgrind errors probably denote bugs.  Should we not fix
these bugs?

Gustavo J. A. M. Carneiro
INESC Porto, UTM, WiN, http://win.inescporto.pt/gjc
"The universe is always one step beyond logic." -- Frank Herbert

More information about the Ns-developers mailing list