LINUX.ORG.RU

valgrind


0

0

Здраствуйте

Использую valgrind для выявления утечек памяти, 
но тут обратил внимание на errors.

==26129== ERROR SUMMARY: 89 errors from 1 contexts (suppressed: 7 from 1)
==26129== malloc/free: in use at exit: 0 bytes in 0 blocks.
==26129== malloc/free: 89 allocs, 89 frees, 22,695 bytes allocated.

Собсно вопрос что это за ошибки (какого плана)?

Так как прога работает стабильно 24*7.
★★★

Re: valgrind

--leak-check=full наверное надо использовать, нет?

welkam ()
Ответ на: Re: valgrind от welkam

Re: valgrind

использую и так valgrind --leak-check=full --leak-resolution=med ./zigbee_client

fura13 ★★★ ()
Ответ на: Re: valgrind от fura13

Re: valgrind

valgrind --leak-check=full -v

fghj ★★★★★ ()
Ответ на: Re: valgrind от fghj

Re: valgrind

-v не добавил счастья ... может я где что то тупо невижу?

==26067== Memcheck, a memory error detector.
==26067== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==26067== Using LibVEX rev 1804, a library for dynamic binary translation.
==26067== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==26067== Using valgrind-3.3.0, a dynamic binary instrumentation framework.
==26067== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==26067==
--26067-- Command line
--26067--    ./zigbee_client
--26067-- Startup, with flags:
--26067--    -v
--26067--    --leak-check=full
--26067--    --leak-resolution=med
--26067-- Contents of /proc/version:
--26067--   Linux version 2.6.19-gentoo-r4 (root@localhost) (gcc version 3.4.6 (Gentoo 3.4.6-r2, ssp-3.4.6-1.0, pie-8.7.10)) #6 SMP Tue Jan 22 12:51:57 MSK 2008
--26067-- Arch and hwcaps: X86, x86-sse1-sse2
--26067-- Page sizes: currently 4096, max supported 4096
--26067-- Valgrind library directory: /usr/lib/valgrind
--26067-- Reading syms from /lib/ld-2.5.so (0x4000000)
--26067-- Reading syms from zigbee_client (0x8048000)
--26067-- Reading syms from /usr/lib/valgrind/x86-linux/memcheck (0x38000000)
--26067--    object doesn't have a symbol table
--26067--    object doesn't have a dynamic symbol table
--26067-- Reading suppressions file: /usr/lib/valgrind/default.supp
--26067-- REDIR: 0x4014890 (index) redirected to 0x380312a7 (???)
--26067-- Reading syms from /usr/lib/valgrind/x86-linux/vgpreload_core.so (0x401D000)
--26067--    object doesn't have a symbol table
--26067-- Reading syms from /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so (0x401F000)
--26067--    object doesn't have a symbol table
==26067== WARNING: new redirection conflicts with existing -- ignoring it
--26067--     new: 0x04014890 (index               ) R-> 0x04022ff9 index
--26067-- Reading syms from /lib/libc-2.5.so (0x402C000)
--26067--    object doesn't have a symbol table
--26067-- REDIR: 0x4094970 (rindex) redirected to 0x4022f2b (rindex)
--26067-- REDIR: 0x4090b7f (malloc) redirected to 0x40207b1 (malloc)
--26067-- REDIR: 0x408f36b (free) redirected to 0x4021a0d (free)
==26067== Conditional jump or move depends on uninitialised value(s)
==26067==    at 0x80487C5: main (client.c:25)
==26067==
==26067== Process terminating with default action of signal 2 (SIGINT)
==26067==    at 0x40B4E10: nanosleep (in /lib/libc-2.5.so)
==26067==    by 0x80487A4: main (client.c:22)
--26067-- REDIR: 0x4095730 (memset) redirected to 0x4023c7a (memset)
==26067==
==26067== ERROR SUMMARY: 31 errors from 1 contexts (suppressed: 7 from 1)
==26067==
==26067== 31 errors in context 1 of 1:
==26067== Conditional jump or move depends on uninitialised value(s)
==26067==    at 0x80487C5: main (client.c:25)
--26067--
--26067-- supp:      7 dl-hack3
==26067==
==26067== IN SUMMARY: 31 errors from 1 contexts (suppressed: 7 from 1)
==26067==
==26067== malloc/free: in use at exit: 0 bytes in 0 blocks.
==26067== malloc/free: 31 allocs, 31 frees, 7,905 bytes allocated.
==26067==
==26067== All heap blocks were freed -- no leaks are possible.
--26067--  memcheck: sanity checks: 0 cheap, 1 expensive
--26067--  memcheck: auxmaps: 0 auxmap entries (0k, 0M) in use
--26067--  memcheck: auxmaps_L1: 0 searches, 0 cmps, ratio 0:10
--26067--  memcheck: auxmaps_L2: 0 searches, 0 nodes
--26067--  memcheck: SMs: n_issued      = 7 (112k, 0M)
--26067--  memcheck: SMs: n_deissued    = 0 (0k, 0M)
--26067--  memcheck: SMs: max_noaccess  = 65535 (1048560k, 1023M)
--26067--  memcheck: SMs: max_undefined = 0 (0k, 0M)
--26067--  memcheck: SMs: max_defined   = 19 (304k, 0M)
--26067--  memcheck: SMs: max_non_DSM   = 7 (112k, 0M)
--26067--  memcheck: max sec V bit nodes:    0 (0k, 0M)
--26067--  memcheck: set_sec_vbits8 calls: 0 (new: 0, updates: 0)
--26067--  memcheck: max shadow mem size:   416k, 0M
--26067-- translate:            fast SP updates identified: 1,441 ( 90.3%)
--26067-- translate:   generic_known SP updates identified: 85 (  5.3%)
--26067-- translate: generic_unknown SP updates identified: 69 (  4.3%)
--26067--     tt/tc: 2,918 tt lookups requiring 2,931 probes
--26067--     tt/tc: 2,918 fast-cache updates, 2 flushes
--26067--  transtab: new        1,459 (31,545 -> 463,819; ratio 147:10) [0 scs]
--26067--  transtab: dumped     0 (0 -> ??)
--26067--  transtab: discarded  0 (0 -> ??)
--26067-- scheduler: 31,394 jumps (bb entries).
--26067-- scheduler: 0/1,623 major/minor sched events.
--26067--    sanity: 1 cheap, 1 expensive checks.
--26067--    exectx: 769 lists, 10 contexts (avg 0 per list)
--26067--    exectx: 100 searches, 90 full compares (900 per 1000)
--26067--    exectx: 0 cmp2, 58 cmp4, 0 cmpAll
--26067--  errormgr: 8 supplist searches, 48 comparisons during search
--26067--  errormgr: 38 errlist searches, 58 comparisons during search

fura13 ★★★ ()
Ответ на: Re: valgrind от fura13

Re: valgrind

Ну вот читай внимательно:

==26067== Conditional jump or move depends on uninitialised value(s) ==26067== at 0x80487C5: main (client.c:25) --26067-- --26067-- supp: 7 dl-hack3

Туда и смотри всвой код

welkam ()

Re: valgrind

хороша эта штука, валгринд... вот только с ума сходит от -O3 :)

halturin ★★★★★ ()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.