Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > cmake + google test: weirdo dependency

Reply
Thread Tools

cmake + google test: weirdo dependency

 
 
Giovanni Azua
Guest
Posts: n/a
 
      10-08-2011
Hello all,

I setup a project using cmake and google test for a Fast Multipole
implementation I am working on (graduate study project). It is working fine
however when I run valgrind checking for memory leaks or using callgrind I
find some weirdo ImageLoaderMachO code (see output below) I have done all
kind of searches but can't find where such junk comes from ((

find . \( -not -path "*svn*" \) -exec grep -Hi "image" {} \;

Likewise, searching for "loadermacho" "library" etc doesn't bring any clues
as to where this junk is coming from? Would this be a dependency of Google
Test maybe?

TIA,
Best regards,
Giovanni

/Users/bravegag/code/mmc11/trunk/build$ valgrind --tool=memcheck
--leak-check=full --show-reachable=yes --dsymutil=yes ./test_tree
==17516== Memcheck, a memory error detector
==17516== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==17516== Using Valgrind-3.7.0.SVN and LibVEX; rerun with -h for copyright
info
==17516== Command: ./test_tree
==17516==
Running main() from gtest_main.cc
[==========] Running 4 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 4 tests from TreeTest
[ RUN ] TreeTest.UniformDistribution
Particles per box:
9 6 6 4 9 6 6 4 9 6 6 4 9 6 6 4
[ OK ] TreeTest.UniformDistribution (153 ms)
[ RUN ] TreeTest.LineUniformDistribution
Particles per box:
0 0 0 0 0 0 6 7 0 0 6 6 0 0 0 0 6 7 0 0 6 6 0 0 0 0 0 0 6 7 0 0 6 6 0 0 0 0
6 7 0 0 6 6 0 0
[ OK ] TreeTest.LineUniformDistribution (29 ms)
[ RUN ] TreeTest.LineDiagUniformDistribution
Particles per box:
0 0 1 0 6 6 0 0 6 6 0 0 1 0 6 6 0 0 6 6 0 0 0 0 1 0 6 6 0 0 6 6 0 0 1 0 6 6
0 0 6 6 0 0 0 0
[ OK ] TreeTest.LineDiagUniformDistribution (30 ms)
[ RUN ] TreeTest.SmallUniformDistribution
Particles per box:
0 0 10 4 6 6 9 4 4 6 6 4 6 6 9 4 4 6 6 0 0 0
[ OK ] TreeTest.SmallUniformDistribution (23 ms)
[----------] 4 tests from TreeTest (257 ms total)

[----------] Global test environment tear-down
[==========] 4 tests from 1 test case ran. (332 ms total)
[ PASSED ] 4 tests.
==17516==
==17516== HEAP SUMMARY:
==17516== in use at exit: 6,317 bytes in 29 blocks
==17516== total heap usage: 1,187 allocs, 1,158 frees, 346,982 bytes
allocated
==17516==
==17516== 8 bytes in 1 blocks are still reachable in loss record 1 of 9
==17516== at 0xD62F: malloc (vg_replace_malloc.c:266)
==17516== by 0x7FFF5FC11B9E: malloc (in /usr/lib/dyld)
==17516== by 0x7FFF5FC19BB2: operator new(unsigned long) (in
/usr/lib/dyld)
==17516== by 0x7FFF5FC080F2: std::vector<char const*
(*)(dyld_image_states, unsigned int, dyld_image_info const*),
std::allocator<char const* (*)(dyld_image_states, unsigned int,
dyld_image_info const*)> >::_M_insert_aux(__gnu_cxx::__normal_iterator<ch ar
const* (**)(dyld_image_states, unsigned int, dyld_image_info const*),
std::vector<char const* (*)(dyld_image_states, unsigned int, dyld_image_info
const*), std::allocator<char const* (*)(dyld_image_states, unsigned int,
dyld_image_info const*)> > >, char const* (* const&)(dyld_image_states,
unsigned int, dyld_image_info const*)) (in /usr/lib/dyld)
==17516== by 0x7FFF5FC081D4: std::vector<char const*
(*)(dyld_image_states, unsigned int, dyld_image_info const*),
std::allocator<char const* (*)(dyld_image_states, unsigned int,
dyld_image_info const*)> >::insert(__gnu_cxx::__normal_iterator<char const*
(**)(dyld_image_states, unsigned int, dyld_image_info const*),
std::vector<char const* (*)(dyld_image_states, unsigned int, dyld_image_info
const*), std::allocator<char const* (*)(dyld_image_states, unsigned int,
dyld_image_info const*)> > >, char const* (* const&)(dyld_image_states,
unsigned int, dyld_image_info const*)) (in /usr/lib/dyld)
==17516== by 0x7FFF5FC0546F:
dyld::registerImageStateBatchChangeHandler(dyld_im age_states, char const*
(*)(dyld_image_states, unsigned int, dyld_image_info const*)) (in
/usr/lib/dyld)
==17516== by 0x1BFACB: dyld_register_image_state_change_handler (in
/usr/lib/system/libdyld.dylib)
==17516== by 0x1C0ACB: _dyld_initializer (in
/usr/lib/system/libdyld.dylib)
==17516== by 0x1AE73: libSystem_initializer (in
/usr/lib/libSystem.B.dylib)
==17516== by 0x7FFF5FC0FD19:
ImageLoaderMachO::doModInitFunctions(ImageLoader:: LinkContext const&) (in
/usr/lib/dyld)
==17516== by 0x7FFF5FC0FA65:
ImageLoaderMachO::doInitialization(ImageLoader::Li nkContext const&) (in
/usr/lib/dyld)
==17516== by 0x7FFF5FC0D257:
ImageLoader::recursiveInitialization(ImageLoader:: LinkContext const&,
unsigned int, ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==17516==
==17516== 82 bytes in 6 blocks are still reachable in loss record 2 of 9
==17516== at 0xD62F: malloc (vg_replace_malloc.c:266)
==17516== by 0x250358: strdup (in /usr/lib/system/libsystem_c.dylib)
==17516== by 0x3E69F6: _xpc_strdup (in /usr/lib/system/libxpc.dylib)
==17516== by 0x3ECDD3: _xpc_dictionary_insert (in
/usr/lib/system/libxpc.dylib)
==17516== by 0x3ECF12: xpc_dictionary_set_string (in
/usr/lib/system/libxpc.dylib)
==17516== by 0x3EEF55: _libxpc_initializer (in
/usr/lib/system/libxpc.dylib)
==17516== by 0x1AE7D: libSystem_initializer (in
/usr/lib/libSystem.B.dylib)
==17516== by 0x7FFF5FC0FD19:
ImageLoaderMachO::doModInitFunctions(ImageLoader:: LinkContext const&) (in
/usr/lib/dyld)
==17516== by 0x7FFF5FC0FA65:
ImageLoaderMachO::doInitialization(ImageLoader::Li nkContext const&) (in
/usr/lib/dyld)
==17516== by 0x7FFF5FC0D257:
ImageLoader::recursiveInitialization(ImageLoader:: LinkContext const&,
unsigned int, ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==17516== by 0x7FFF5FC0D1F0:
ImageLoader::recursiveInitialization(ImageLoader:: LinkContext const&,
unsigned int, ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==17516== by 0x7FFF5FC0E02A:
ImageLoader::runInitializers(ImageLoader::LinkCont ext const&,
ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==17516==
==17516== 88 bytes in 1 blocks are still reachable in loss record 3 of 9
==17516== at 0xD62F: malloc (vg_replace_malloc.c:266)
==17516== by 0x1C89B0: get_or_create_key_element (in
/usr/lib/system/libkeymgr.dylib)
==17516== by 0x1C8BC9: _keymgr_get_and_lock_processwide_ptr_2 (in
/usr/lib/system/libkeymgr.dylib)
==17516== by 0x1C8C36: __keymgr_initializer (in
/usr/lib/system/libkeymgr.dylib)
==17516== by 0x1AE6E: libSystem_initializer (in
/usr/lib/libSystem.B.dylib)
==17516== by 0x7FFF5FC0FD19:
ImageLoaderMachO::doModInitFunctions(ImageLoader:: LinkContext const&) (in
/usr/lib/dyld)
==17516== by 0x7FFF5FC0FA65:
ImageLoaderMachO::doInitialization(ImageLoader::Li nkContext const&) (in
/usr/lib/dyld)
==17516== by 0x7FFF5FC0D257:
ImageLoader::recursiveInitialization(ImageLoader:: LinkContext const&,
unsigned int, ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==17516== by 0x7FFF5FC0D1F0:
ImageLoader::recursiveInitialization(ImageLoader:: LinkContext const&,
unsigned int, ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==17516== by 0x7FFF5FC0E02A:
ImageLoader::runInitializers(ImageLoader::LinkCont ext const&,
ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==17516== by 0x7FFF5FC03487: dyld::initializeMainExecutable() (in
/usr/lib/dyld)
==17516== by 0x7FFF5FC0757F: dyld::_main(macho_header const*, unsigned
long, int, char const**, char const**, char const**) (in /usr/lib/dyld)
==17516==
==17516== 136 bytes in 1 blocks are still reachable in loss record 4 of 9
==17516== at 0xD30A: calloc (vg_replace_malloc.c:569)
==17516== by 0x3E6AEE: _xpc_calloc (in /usr/lib/system/libxpc.dylib)
==17516== by 0x3E73C8: _xpc_base_create (in /usr/lib/system/libxpc.dylib)
==17516== by 0x3F0D0C: _xpc_domain_create (in
/usr/lib/system/libxpc.dylib)
==17516== by 0x3EEFE7: _libxpc_initializer (in
/usr/lib/system/libxpc.dylib)
==17516== by 0x1AE7D: libSystem_initializer (in
/usr/lib/libSystem.B.dylib)
==17516== by 0x7FFF5FC0FD19:
ImageLoaderMachO::doModInitFunctions(ImageLoader:: LinkContext const&) (in
/usr/lib/dyld)
==17516== by 0x7FFF5FC0FA65:
ImageLoaderMachO::doInitialization(ImageLoader::Li nkContext const&) (in
/usr/lib/dyld)
==17516== by 0x7FFF5FC0D257:
ImageLoader::recursiveInitialization(ImageLoader:: LinkContext const&,
unsigned int, ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==17516== by 0x7FFF5FC0D1F0:
ImageLoader::recursiveInitialization(ImageLoader:: LinkContext const&,
unsigned int, ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==17516== by 0x7FFF5FC0E02A:
ImageLoader::runInitializers(ImageLoader::LinkCont ext const&,
ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==17516== by 0x7FFF5FC03487: dyld::initializeMainExecutable() (in
/usr/lib/dyld)
==17516==
==17516== 192 bytes in 6 blocks are still reachable in loss record 5 of 9
==17516== at 0xD62F: malloc (vg_replace_malloc.c:266)
==17516== by 0x3E6B31: _xpc_malloc (in /usr/lib/system/libxpc.dylib)
==17516== by 0x3ECDB8: _xpc_dictionary_insert (in
/usr/lib/system/libxpc.dylib)
==17516== by 0x3ECF12: xpc_dictionary_set_string (in
/usr/lib/system/libxpc.dylib)
==17516== by 0x3EEF55: _libxpc_initializer (in
/usr/lib/system/libxpc.dylib)
==17516== by 0x1AE7D: libSystem_initializer (in
/usr/lib/libSystem.B.dylib)
==17516== by 0x7FFF5FC0FD19:
ImageLoaderMachO::doModInitFunctions(ImageLoader:: LinkContext const&) (in
/usr/lib/dyld)
==17516== by 0x7FFF5FC0FA65:
ImageLoaderMachO::doInitialization(ImageLoader::Li nkContext const&) (in
/usr/lib/dyld)
==17516== by 0x7FFF5FC0D257:
ImageLoader::recursiveInitialization(ImageLoader:: LinkContext const&,
unsigned int, ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==17516== by 0x7FFF5FC0D1F0:
ImageLoader::recursiveInitialization(ImageLoader:: LinkContext const&,
unsigned int, ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==17516== by 0x7FFF5FC0E02A:
ImageLoader::runInitializers(ImageLoader::LinkCont ext const&,
ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==17516== by 0x7FFF5FC03487: dyld::initializeMainExecutable() (in
/usr/lib/dyld)
==17516==
==17516== 528 bytes in 6 blocks are still reachable in loss record 6 of 9
==17516== at 0xD30A: calloc (vg_replace_malloc.c:569)
==17516== by 0x3E6AEE: _xpc_calloc (in /usr/lib/system/libxpc.dylib)
==17516== by 0x3E73C8: _xpc_base_create (in /usr/lib/system/libxpc.dylib)
==17516== by 0x3EDCEE: xpc_string_create (in
/usr/lib/system/libxpc.dylib)
==17516== by 0x3ECF01: xpc_dictionary_set_string (in
/usr/lib/system/libxpc.dylib)
==17516== by 0x3EEF55: _libxpc_initializer (in
/usr/lib/system/libxpc.dylib)
==17516== by 0x1AE7D: libSystem_initializer (in
/usr/lib/libSystem.B.dylib)
==17516== by 0x7FFF5FC0FD19:
ImageLoaderMachO::doModInitFunctions(ImageLoader:: LinkContext const&) (in
/usr/lib/dyld)
==17516== by 0x7FFF5FC0FA65:
ImageLoaderMachO::doInitialization(ImageLoader::Li nkContext const&) (in
/usr/lib/dyld)
==17516== by 0x7FFF5FC0D257:
ImageLoader::recursiveInitialization(ImageLoader:: LinkContext const&,
unsigned int, ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==17516== by 0x7FFF5FC0D1F0:
ImageLoader::recursiveInitialization(ImageLoader:: LinkContext const&,
unsigned int, ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==17516== by 0x7FFF5FC0E02A:
ImageLoader::runInitializers(ImageLoader::LinkCont ext const&,
ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==17516==
==17516== 579 bytes in 6 blocks are still reachable in loss record 7 of 9
==17516== at 0xD62F: malloc (vg_replace_malloc.c:266)
==17516== by 0x250358: strdup (in /usr/lib/system/libsystem_c.dylib)
==17516== by 0x3E69F6: _xpc_strdup (in /usr/lib/system/libxpc.dylib)
==17516== by 0x3EDCF9: xpc_string_create (in
/usr/lib/system/libxpc.dylib)
==17516== by 0x3ECF01: xpc_dictionary_set_string (in
/usr/lib/system/libxpc.dylib)
==17516== by 0x3EEF55: _libxpc_initializer (in
/usr/lib/system/libxpc.dylib)
==17516== by 0x1AE7D: libSystem_initializer (in
/usr/lib/libSystem.B.dylib)
==17516== by 0x7FFF5FC0FD19:
ImageLoaderMachO::doModInitFunctions(ImageLoader:: LinkContext const&) (in
/usr/lib/dyld)
==17516== by 0x7FFF5FC0FA65:
ImageLoaderMachO::doInitialization(ImageLoader::Li nkContext const&) (in
/usr/lib/dyld)
==17516== by 0x7FFF5FC0D257:
ImageLoader::recursiveInitialization(ImageLoader:: LinkContext const&,
unsigned int, ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==17516== by 0x7FFF5FC0D1F0:
ImageLoader::recursiveInitialization(ImageLoader:: LinkContext const&,
unsigned int, ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==17516== by 0x7FFF5FC0E02A:
ImageLoader::runInitializers(ImageLoader::LinkCont ext const&,
ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==17516==
==17516== 608 bytes in 1 blocks are still reachable in loss record 8 of 9
==17516== at 0xD30A: calloc (vg_replace_malloc.c:569)
==17516== by 0x3E6AEE: _xpc_calloc (in /usr/lib/system/libxpc.dylib)
==17516== by 0x3E73C8: _xpc_base_create (in /usr/lib/system/libxpc.dylib)
==17516== by 0x3ED0DE: xpc_dictionary_create (in
/usr/lib/system/libxpc.dylib)
==17516== by 0x3EEF2C: _libxpc_initializer (in
/usr/lib/system/libxpc.dylib)
==17516== by 0x1AE7D: libSystem_initializer (in
/usr/lib/libSystem.B.dylib)
==17516== by 0x7FFF5FC0FD19:
ImageLoaderMachO::doModInitFunctions(ImageLoader:: LinkContext const&) (in
/usr/lib/dyld)
==17516== by 0x7FFF5FC0FA65:
ImageLoaderMachO::doInitialization(ImageLoader::Li nkContext const&) (in
/usr/lib/dyld)
==17516== by 0x7FFF5FC0D257:
ImageLoader::recursiveInitialization(ImageLoader:: LinkContext const&,
unsigned int, ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==17516== by 0x7FFF5FC0D1F0:
ImageLoader::recursiveInitialization(ImageLoader:: LinkContext const&,
unsigned int, ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==17516== by 0x7FFF5FC0E02A:
ImageLoader::runInitializers(ImageLoader::LinkCont ext const&,
ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==17516== by 0x7FFF5FC03487: dyld::initializeMainExecutable() (in
/usr/lib/dyld)
==17516==
==17516== 4,096 bytes in 1 blocks are still reachable in loss record 9 of 9
==17516== at 0xD62F: malloc (vg_replace_malloc.c:266)
==17516== by 0x25D3F7: __smakebuf (in /usr/lib/system/libsystem_c.dylib)
==17516== by 0x253D19: __swsetup (in /usr/lib/system/libsystem_c.dylib)
==17516== by 0x289D2D: __sfvwrite (in /usr/lib/system/libsystem_c.dylib)
==17516== by 0x289CA4: fwrite (in /usr/lib/system/libsystem_c.dylib)
==17516== by 0x7C710: std::basic_ostream<char, std::char_traits<char> >&
std::__ostream_insert<char, std::char_traits<char>
>(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) (in

/usr/lib/libstdc++.6.0.9.dylib)
==17516== by 0x7C7E9: std::basic_ostream<char, std::char_traits<char> >&
std:perator<< <std::char_traits<char> >(std::basic_ostream<char,
std::char_traits<char> >&, char const*) (in /usr/lib/libstdc++.6.0.9.dylib)
==17516== by 0x10004D17C: main (in ./test_tree)
==17516==
==17516== LEAK SUMMARY:
==17516== definitely lost: 0 bytes in 0 blocks
==17516== indirectly lost: 0 bytes in 0 blocks
==17516== possibly lost: 0 bytes in 0 blocks
==17516== still reachable: 6,317 bytes in 29 blocks
==17516== suppressed: 0 bytes in 0 blocks
==17516==
==17516== For counts of detected and suppressed errors, rerun with: -v
==17516== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 1 from 1)
/Users/bravegag/code/mmc11/trunk/build$


 
Reply With Quote
 
 
 
 
Victor Bazarov
Guest
Posts: n/a
 
      10-08-2011
On 10/8/2011 9:00 AM, Giovanni Azua wrote:
> I setup a project using cmake and google test for a Fast Multipole
> implementation I am working on (graduate study project). It is working fine
> however when I run valgrind checking for memory leaks or using callgrind I
> find some weirdo ImageLoaderMachO code (see output below) I have done all
> kind of searches but can't find where such junk comes from ((
>
> find . \( -not -path "*svn*" \) -exec grep -Hi "image" {} \;
>
> Likewise, searching for "loadermacho" "library" etc doesn't bring any clues
> as to where this junk is coming from? Would this be a dependency of Google
> Test maybe?

[...]

Was there a C++ language question that I didn't notice? If not, find a
better place to ask your question. The Google Test online community (if
there is such a place) sounds like a good first approximation.

V
--
I do not respond to top-posted replies, please don't ask
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
(debian) compilation of qt4-qtruby : help needed for cmake lolveley Ruby 1 05-29-2009 07:17 AM
thinkpad r40 went weirdo el__marcin@o2.pl Computer Information 5 07-12-2006 01:22 AM
thinkpad r40 went weirdo el__marcin@o2.pl Computer Support 6 07-11-2006 08:57 PM
el-weirdo spam Invisible NZ Computing 16 07-18-2005 05:43 AM
How can you make Cmake use gcc on WinXP? todd_gable@invision.iip.com C++ 1 03-21-2005 04:14 AM



Advertisments