[Ace-users] ACE_Stream beginner problem

rt taglioretti at yahoo.com
Mon Jan 14 20:29:02 CST 2008


Hi,
I hope is Enough to understand.

Roberto

(sorry for my english)

==1271== Memcheck, a memory error detector.
==1271== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et
al.
==1271== Using LibVEX rev 1804, a library for dynamic binary
translation.
==1271== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==1271== Using valgrind-3.3.0, a dynamic binary instrumentation
framework.
==1271== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et
al.
==1271== For more details, rerun with: -v
==1271==
(1271|16384) ---------------------------------------- start test 0
(1271|16384) stream->open(NULL) retVal == 0
(1271|16384) stream->close() retVal == 0
(1271|16384) ----------------------------------------  end test 0

==1271== Invalid free() / delete / delete[]
==1271==    at 0x401B859: free (vg_replace_malloc.c:323)
==1271==    by 0x43EBA5B: free_mem (in /lib/libc-2.3.2.so)
==1271==    by 0x43EB7C8: __libc_freeres (in /lib/libc-2.3.2.so)
==1271==    by 0x40164A0: _vgnU_freeres (vg_preloaded.c:60)
==1271==    by 0x430324F: exit (in /lib/libc-2.3.2.so)
==1271==    by 0x42ECD0D: (below main) (in /lib/libc-2.3.2.so)
==1271==  Address 0x42d6270 is not stack'd, malloc'd or (recently)
free'd
==1271==
==1271== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 25 from
1)
==1271== malloc/free: in use at exit: 17,737 bytes in 13 blocks.
==1271== malloc/free: 69 allocs, 57 frees, 67,511 bytes allocated.
==1271== For counts of detected errors, rerun with: -v
==1271== searching for pointers to 13 not-freed blocks.
==1271== checked 747,324 bytes.
==1271==
==1271==
==1271== 92 bytes in 1 blocks are indirectly lost in loss record 1 of
10
==1271==    at 0x401B02D: operator new(unsigned, std::nothrow_t
const&) (vg_replace_malloc.c:244)
==1271==    by 0x804DF77: ACE_Stream<ACE_MT_SYNCH>::open(void*,
ACE_Module<ACE_MT_SYNCH>*, ACE_Module<ACE_MT_SYNCH>*) (in /sviluppo/
linux/leiconsqd/server/cmstream)
==1271==    by 0x804DAD0: ACE_Stream<ACE_MT_SYNCH>::ACE_Stream(void*,
ACE_Module<ACE_MT_SYNCH>*, ACE_Module<ACE_MT_SYNCH>*) (in /sviluppo/
linux/leiconsqd/server/cmstream)
==1271==    by 0x804D8F0: main (in /sviluppo/linux/leiconsqd/server/
cmstream)
==1271==
==1271==
==1271== 92 bytes in 1 blocks are indirectly lost in loss record 2 of
10
==1271==    at 0x401B02D: operator new(unsigned, std::nothrow_t
const&) (vg_replace_malloc.c:244)
==1271==    by 0x804DEA3: ACE_Stream<ACE_MT_SYNCH>::open(void*,
ACE_Module<ACE_MT_SYNCH>*, ACE_Module<ACE_MT_SYNCH>*) (in /sviluppo/
linux/leiconsqd/server/cmstream)
==1271==    by 0x804DAD0: ACE_Stream<ACE_MT_SYNCH>::ACE_Stream(void*,
ACE_Module<ACE_MT_SYNCH>*, ACE_Module<ACE_MT_SYNCH>*) (in /sviluppo/
linux/leiconsqd/server/cmstream)
==1271==    by 0x804D8F0: main (in /sviluppo/linux/leiconsqd/server/
cmstream)
==1271==
==1271==
==1271== 92 bytes in 1 blocks are indirectly lost in loss record 3 of
10
==1271==    at 0x401B02D: operator new(unsigned, std::nothrow_t
const&) (vg_replace_malloc.c:244)
==1271==    by 0x804DCE4: ACE_Stream<ACE_MT_SYNCH>::open(void*,
ACE_Module<ACE_MT_SYNCH>*, ACE_Module<ACE_MT_SYNCH>*) (in /sviluppo/
linux/leiconsqd/server/cmstream)
==1271==    by 0x804DAD0: ACE_Stream<ACE_MT_SYNCH>::ACE_Stream(void*,
ACE_Module<ACE_MT_SYNCH>*, ACE_Module<ACE_MT_SYNCH>*) (in /sviluppo/
linux/leiconsqd/server/cmstream)
==1271==    by 0x804D8F0: main (in /sviluppo/linux/leiconsqd/server/
cmstream)
==1271==
==1271==
==1271== 128 bytes in 1 blocks are still reachable in loss record 4 of
10
==1271==    at 0x401C2AD: calloc (vg_replace_malloc.c:397)
==1271==    by 0x428E053: pthread_setspecific (in /lib/
libpthread-0.10.so)
==1271==    by 0x4109F80: ACE_OS::thr_setspecific(unsigned, void*)
(OS_NS_Thread.cpp:5074)
==1271==    by 0x413FDAA:
ACE_TSS<ACE_Service_Gestalt>::ACE_TSS(ACE_Service_Gestalt*)
(Thread.inl:40)
==1271==    by 0x413FB17: ACE_Unmanaged_Singleton<ACE_Service_Config,
ACE_Recursive_Thread_Mutex>::instance() (Service_Config.cpp:378)
==1271==    by 0x413EBB5: ACE_Service_Config::static_svcs()
(Service_Config.cpp:329)
==1271==    by 0x410C662: ACE_Object_Manager::init()
(Object_Manager.cpp:133)
==1271==    by 0x410D026: ACE_Object_Manager::ACE_Object_Manager()
(Object_Manager.cpp:312)
==1271==    by 0x410D2B4: ACE_Object_Manager::instance()
(Object_Manager.cpp:339)
==1271==    by 0x410C3C5:
__static_initialization_and_destruction_0(int, int)
(Object_Manager.cpp:757)
==1271==    by 0x410E5D1:
_GLOBAL__I__ZN18ACE_Object_Manager9instance_E (Truncate.h:385)
==1271==    by 0x41629B4: (within /usr/local/lib/libACE-5.6.so)
==1271==
==1271==
==1271== 4,097 bytes in 1 blocks are still reachable in loss record 5
of 10
==1271==    at 0x401B5ED: operator new[](unsigned, std::nothrow_t
const&) (vg_replace_malloc.c:288)
==1271==    by 0x40EA948: ACE_Log_Msg::ACE_Log_Msg() (Log_Msg.cpp:708)
==1271==    by 0x40EA111: ACE_Log_Msg::instance() (Thread.inl:40)
==1271==    by 0x410C5F7: ACE_Object_Manager::init()
(Object_Manager.cpp:262)
==1271==    by 0x410D026: ACE_Object_Manager::ACE_Object_Manager()
(Object_Manager.cpp:312)
==1271==    by 0x410D2B4: ACE_Object_Manager::instance()
(Object_Manager.cpp:339)
==1271==    by 0x410C3C5:
__static_initialization_and_destruction_0(int, int)
(Object_Manager.cpp:757)
==1271==    by 0x410E5D1:
_GLOBAL__I__ZN18ACE_Object_Manager9instance_E (Truncate.h:385)
==1271==    by 0x41629B4: (within /usr/local/lib/libACE-5.6.so)
==1271==    by 0x40A0FB4: (within /usr/local/lib/libACE-5.6.so)
==1271==    by 0x400AF3D: call_init (dl-init.c:68)
==1271==    by 0x400B035: _dl_init (dl-init.c:140)
==1271==
==1271==
==1271== 4,176 bytes in 1 blocks are still reachable in loss record 6
of 10
==1271==    at 0x401B02D: operator new(unsigned, std::nothrow_t
const&) (vg_replace_malloc.c:244)
==1271==    by 0x40EA0A2: ACE_Log_Msg::instance() (Log_Msg.cpp:367)
==1271==    by 0x410C5F7: ACE_Object_Manager::init()
(Object_Manager.cpp:262)
==1271==    by 0x410D026: ACE_Object_Manager::ACE_Object_Manager()
(Object_Manager.cpp:312)
==1271==    by 0x410D2B4: ACE_Object_Manager::instance()
(Object_Manager.cpp:339)
==1271==    by 0x410C3C5:
__static_initialization_and_destruction_0(int, int)
(Object_Manager.cpp:757)
==1271==    by 0x410E5D1:
_GLOBAL__I__ZN18ACE_Object_Manager9instance_E (Truncate.h:385)
==1271==    by 0x41629B4: (within /usr/local/lib/libACE-5.6.so)
==1271==    by 0x40A0FB4: (within /usr/local/lib/libACE-5.6.so)
==1271==    by 0x400AF3D: call_init (dl-init.c:68)
==1271==    by 0x400B035: _dl_init (dl-init.c:140)
==1271==    by 0x4000BEC: (within /lib/ld-2.3.2.so)
==1271==
==1271==
==1271== 9,336 (92 direct, 9,244 indirect) bytes in 1 blocks are
definitely lost in loss record 7 of 10
==1271==    at 0x401B02D: operator new(unsigned, std::nothrow_t
const&) (vg_replace_malloc.c:244)
==1271==    by 0x804DC13: ACE_Stream<ACE_MT_SYNCH>::open(void*,
ACE_Module<ACE_MT_SYNCH>*, ACE_Module<ACE_MT_SYNCH>*) (in /sviluppo/
linux/leiconsqd/server/cmstream)
==1271==    by 0x804DAD0: ACE_Stream<ACE_MT_SYNCH>::ACE_Stream(void*,
ACE_Module<ACE_MT_SYNCH>*, ACE_Module<ACE_MT_SYNCH>*) (in /sviluppo/
linux/leiconsqd/server/cmstream)
==1271==    by 0x804D8F0: main (in /sviluppo/linux/leiconsqd/server/
cmstream)
==1271==
==1271==
==1271== 720 bytes in 4 blocks are indirectly lost in loss record 8 of
10
==1271==    at 0x401B02D: operator new(unsigned, std::nothrow_t
const&) (vg_replace_malloc.c:244)
==1271==    by 0x804E615:
ACE_Task<ACE_MT_SYNCH>::ACE_Task(ACE_Thread_Manager*,
ACE_Message_Queue<ACE_MT_SYNCH>*) (in /sviluppo/linux/leiconsqd/server/
cmstream)
==1271==    by 0x804E380:
ACE_Stream_Head<ACE_MT_SYNCH>::ACE_Stream_Head() (in /sviluppo/linux/
leiconsqd/server/cmstream)
==1271==    by 0x804DC3B: ACE_Stream<ACE_MT_SYNCH>::open(void*,
ACE_Module<ACE_MT_SYNCH>*, ACE_Module<ACE_MT_SYNCH>*) (in /sviluppo/
linux/leiconsqd/server/cmstream)
==1271==    by 0x804DAD0: ACE_Stream<ACE_MT_SYNCH>::ACE_Stream(void*,
ACE_Module<ACE_MT_SYNCH>*, ACE_Module<ACE_MT_SYNCH>*) (in /sviluppo/
linux/leiconsqd/server/cmstream)
==1271==    by 0x804D8F0: main (in /sviluppo/linux/leiconsqd/server/
cmstream)
==1271==
==1271==
==1271== 4,124 bytes in 1 blocks are indirectly lost in loss record 9
of 10
==1271==    at 0x401B02D: operator new(unsigned, std::nothrow_t
const&) (vg_replace_malloc.c:244)
==1271==    by 0x804E087: ACE_Stream<ACE_MT_SYNCH>::open(void*,
ACE_Module<ACE_MT_SYNCH>*, ACE_Module<ACE_MT_SYNCH>*) (in /sviluppo/
linux/leiconsqd/server/cmstream)
==1271==    by 0x804DAD0: ACE_Stream<ACE_MT_SYNCH>::ACE_Stream(void*,
ACE_Module<ACE_MT_SYNCH>*, ACE_Module<ACE_MT_SYNCH>*) (in /sviluppo/
linux/leiconsqd/server/cmstream)
==1271==    by 0x804D8F0: main (in /sviluppo/linux/leiconsqd/server/
cmstream)
==1271==
==1271==
==1271== 4,124 bytes in 1 blocks are indirectly lost in loss record 10
of 10
==1271==    at 0x401B02D: operator new(unsigned, std::nothrow_t
const&) (vg_replace_malloc.c:244)
==1271==    by 0x804DDB8: ACE_Stream<ACE_MT_SYNCH>::open(void*,
ACE_Module<ACE_MT_SYNCH>*, ACE_Module<ACE_MT_SYNCH>*) (in /sviluppo/
linux/leiconsqd/server/cmstream)
==1271==    by 0x804DAD0: ACE_Stream<ACE_MT_SYNCH>::ACE_Stream(void*,
ACE_Module<ACE_MT_SYNCH>*, ACE_Module<ACE_MT_SYNCH>*) (in /sviluppo/
linux/leiconsqd/server/cmstream)
==1271==    by 0x804D8F0: main (in /sviluppo/linux/leiconsqd/server/
cmstream)
==1271==
==1271== LEAK SUMMARY:
==1271==    definitely lost: 92 bytes in 1 blocks.
==1271==    indirectly lost: 9,244 bytes in 9 blocks.
==1271==      possibly lost: 0 bytes in 0 blocks.
==1271==    still reachable: 8,401 bytes in 3 blocks.
==1271==         suppressed: 0 bytes in 0 blocks.


More information about the Ace-users mailing list