[Insight-developers] Malloc Debug as Dynamic Coverage?

Sean McBride sean at rogue-research.com
Wed Jul 8 10:58:50 EDT 2009


On 7/8/09 10:18 AM, Bradley Lowekamp said:

>	I was looking at running Valgrind on macs, but that does not look good:
>http://www.sealiesoftware.com/valgrind/

There is more recent news, as Mozilla is now working on it too:
<http://blog.mozilla.com/nnethercote/>

But, as you say, valgrind is not yet fully-baked for OS X.

>During that search I encountered some recommendation on just setting  
>some environment variables to enable malloc debugging:
>
>http://developer.apple.com/documentation/Darwin/Reference/ManPages/man3/
>malloc.3.html

We use some of them on our builds:
<http://www.cdash.org/CDash/viewNotes.php?buildid=373124>

>I am currently running an experimental with this enabled to see what  
>happens. I am expecting this to take a while.
>
>As we don't have valgrind currently being run, I was looking for an  
>alternative.

Basically, I've been down this exact road that you are now travelling.

Some of those malloc env vars can be added with no problem.  Others
cause new output to stdout (stderr?) which some tests interpret as a
test failure (presumably because such output was not expected). 

What could be very interesting is to run guard malloc.  See 'man
libgmalloc'.  It causes tremendous slowdown however (as does valgrind). 
I tried it and problems include:
  - full dashboard takes > 24 hrs (on my hardware)
  - most tests fail because they take 'too long'
  - cmake seems to have a non-overridable max test timeout

See also:
<http://www.vtk.org/Bug/view.php?id=4954>

Then I pretty much gave up.

One thing that would help greatly is if ctest made better use of multi
core machines.  For example, if I have an 8 core machine, and most of
the unit tests are single threaded, then most cores are mostly idle.  It
would be cool if a unit test could report to ctest how many cores it
needed, then ctest can decide how many independent tests to run at the
same time.  I suspect that could speed up many dashboards.  Anyone know
if there is a bug for this?

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada




More information about the Insight-developers mailing list