[Insight-developers] Define _GLIBCXX_DEBUG on dashboard?
Sean McBride
sean at rogue-research.com
Tue May 28 14:41:10 EDT 2013
On Tue, 28 May 2013 14:16:32 -0400, Bradley Lowekamp said:
>I am looking through more gcc debug flags and I have come across a
>couple interesting new ones with gcc 4.8:
>
>-fsanitize=address
>Enable AddressSanitizer, a fast memory error detector. Memory access
>instructions will be instrumented to detect out-of-bounds and use-after-
>free bugs. See http://code.google.com/p/address-sanitizer/ for more details.
>-fsanitize=thread
>Enable ThreadSanitizer, a fast data race detector. Memory access
>instructions will be instrumented to detect data race bugs. See http://
>code.google.com/p/data-race-test/wiki/ThreadSanitizer for more details.
>
>
>It looks like they are ported from clang/llvm projects. They looks quite
>useful!
>
>I'd be curios if any one has tried them out in clang or gcc, and what
>they think of them.
I have used them with clang. They are awesome. They are pretty bleeding edge though, and have some false positives.
The most mature of the -fsanitize flags is the undefined behaviour sanitizer (ubsan). I tried enabling ubsan on my Rogue7 ITK dashboard some months ago, but they report a gazillion errors, many from GDCM and vxl. I turned my attention to fixing VTK since its code is easier to work with (IMHO: templates=ugh).
Address sanitizer (asan) probably won't find too much since you already use valgrind, though asan can find overruns of stack and globals, whereas valgrind only checks heap memory.
Thread sanitizer (tsan) only works with linux right now, so I've only tried it a little bit, but it's promising. But fixing tricky threading issues IMHO should come only after we are valgrind-, ubsan-, and asan-clean.
I'll create a 'torture' dashboard on Rogue7 and we can enable one ubsan flag at a time...
Cheers,
--
____________________________________________________________
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