[vtkusers] vtkStringArray problem

Cory Quammen cory.quammen at kitware.com
Wed Dec 3 11:12:55 EST 2014


Rich,

It looks like valgrind thinks it identified something in a system
library and not VTK.

I'm on Ubuntu 12.04 and my valgrind run on this example gives

cory at cory-ubuntu-14:~/code/bin/StringArrayTest$ valgrind ./StringArrayTest
==26715== Memcheck, a memory error detector
==26715== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==26715== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
==26715== Command: ./StringArrayTest

[snip]

==26715==
==26715== HEAP SUMMARY:
==26715==     in use at exit: 0 bytes in 0 blocks
==26715==   total heap usage: 481 allocs, 481 frees, 50,362 bytes allocated
==26715==
==26715== All heap blocks were freed -- no leaks are possible
==26715==
==26715== For counts of detected and suppressed errors, rerun with: -v
==26715== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

On Wed, Dec 3, 2014 at 11:04 AM, mbcx9rb9 <richard.j.brown at live.co.uk> wrote:
> Cory,
>
> Valgrind output looks like this (I omitted test1->test158):
>
> ==17464== Memcheck, a memory error detector
> ==17464== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
> ==17464== Using Valgrind-3.11.0.SVN and LibVEX; rerun with -h for copyright
> info
> ==17464== Command: ./StringArrayTest
> ==17464==
> --17464-- ./StringArrayTest:
> --17464-- dSYM directory is missing; consider using --dsymutil=yes
> --17464-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option
> --17464-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option (repeated 2
> times)
> --17464-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option (repeated 4
> times)
> ==17464== Conditional jump or move depends on uninitialised value(s)
> ==17464==    at 0x10085EC3F: _platform_memchr$VARIANT$Haswell (in
> /usr/lib/system/libsystem_platform.dylib)
> ==17464==    by 0x100652BB6: __sfvwrite (in
> /usr/lib/system/libsystem_c.dylib)
> ==17464==    by 0x1006530CA: fwrite (in /usr/lib/system/libsystem_c.dylib)
> ==17464==    by 0x10039ED29: std::__1::__stdoutbuf<char>::overflow(int) (in
> /usr/lib/libc++.1.dylib)
> ==17464==    by 0x10039491C: std::__1::basic_streambuf<char,
> std::__1::char_traits<char> >::xsputn(char const*, long) (in
> /usr/lib/libc++.1.dylib)
> ==17464==    by 0x10002B135: std::__1::ostreambuf_iterator<char,
> std::__1::char_traits<char> > std::__1::__pad_and_output<char,
> std::__1::char_traits<char> >(std::__1::ostreambuf_iterator<char,
> std::__1::char_traits<char> >, char const*, char const*, char const*,
> std::__1::ios_base&, char) (in /usr/local/lib/libvtkCommonCore-6.1.1.dylib)
> ==17464==    by 0x10002AFAC: std::__1::basic_ostream<char,
> std::__1::char_traits<char> >& std::__1::__put_character_sequence<char,
> std::__1::char_traits<char> >(std::__1::basic_ostream<char,
> std::__1::char_traits<char> >&, char const*, unsigned long) (in
> /usr/local/lib/libvtkCommonCore-6.1.1.dylib)
> ==17464==    by 0x100001F06: main (in ./StringArrayTest)
> ==17464==
> test0
> ...
> test159
> ==17464==
> ==17464== HEAP SUMMARY:
> ==17464==     in use at exit: 41,598 bytes in 421 blocks
> ==17464==   total heap usage: 637 allocs, 216 frees, 82,544 bytes allocated
> ==17464==
> ==17464== LEAK SUMMARY:
> ==17464==    definitely lost: 16 bytes in 1 blocks
> ==17464==    indirectly lost: 0 bytes in 0 blocks
> ==17464==      possibly lost: 13,122 bytes in 116 blocks
> ==17464==    still reachable: 28,460 bytes in 304 blocks
> ==17464==         suppressed: 0 bytes in 0 blocks
> ==17464== Rerun with --leak-check=full to see details of leaked memory
> ==17464==
> ==17464== For counts of detected and suppressed errors, rerun with: -v
> ==17464== Use --track-origins=yes to see where uninitialised values come
> from
> ==17464== ERROR SUMMARY: 1010 errors from 1 contexts (suppressed: 0 from 0)
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/vtkStringArray-problem-tp5729638p5729657.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers


More information about the vtkusers mailing list