Valgrind problem in C code. Please help me.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sitar
    New Member
    • Mar 2012
    • 1

    Valgrind problem in C code. Please help me.

    Hello all, I have serious problem with valgrind errors.
    Code is 1400lines long :( .so, it is imposible to post it in here. Is it someone able to check my code and help me with that errors. I think there are no leaks.
    Errors are bellow :(

    excuse my poor english.


    ==27636== 1 errors in context 1 of 7:
    ==27636== Conditional jump or move depends on uninitialised value(s)
    ==27636== at 0x8049AE6: add_line (in /c/omg/cdoc.exe)
    ==27636== by 0x804A8CD: printComm (in home/c/omg/cdoc.exe)
    ==27636== by 0x8048D77: open_file (in home/c/omg/cdoc.exe)
    ==27636== by 0x804961D: args_check (in home/c/omg/cdoc.exe)
    ==27636== by 0x804A9BE: main (in home/c/omg/cdoc.exe)
    ==27636==
    ==27636== 1 errors in context 2 of 7:
    ==27636== Conditional jump or move depends on uninitialised value(s)
    ==27636== at 0x8049A79: add_line (in home/c/omg/cdoc.exe)
    ==27636== by 0x804A8A2: printComm (in home/c/omg/cdoc.exe)
    ==27636== by 0x8048D77: open_file (in home/c/omg/cdoc.exe)
    ==27636== by 0x804961D: args_check (in home/c/omg/cdoc.exe)
    ==27636== by 0x804A9BE: main (in home/c/omg/cdoc.exe)
    ==27636==
    ==27636== 14 errors in context 3 of 7:
    ==27636== Conditional jump or move depends on uninitialised value(s)
    ==27636== at 0x804A849: printComm (in home/c/omg/cdoc.exe)
    ==27636== by 0x8048D77: open_file (in home/c/omg/cdoc.exe)
    ==27636== by 0x804961D: args_check (in home/c/omg/cdoc.exe)
    ==27636== by 0x804A9BE: main (in home/c/omg/cdoc.exe)
    ==27636==
    ==27636== 23 errors in context 4 of 7:
    ==27636== Conditional jump or move depends on uninitialised value(s)
    ==27636== at 0x402447B: strlen (mc_replace_str mem.c:242)
    ==27636== by 0x8049E5A: add_part (in home/c/omg/cdoc.exe)
    ==27636== by 0x804A2FD: doCom (in home/c/omg/cdoc.exe)
    ==27636== by 0x804A767: checkComm (in home/c/omg/cdoc.exe)
    ==27636== by 0x8048E4C: find_files (in home/c/omg/cdoc.exe)
    ==27636== by 0x8048D72: open_file (in home/c/omg/cdoc.exe)
    ==27636== by 0x804961D: args_check (in home/c/omg/cdoc.exe)
    ==27636== by 0x804A9BE: main (in home/c/omg/cdoc.exe)
    ==27636==
    ==27636== 23 errors in context 5 of 7:
    ==27636== Conditional jump or move depends on uninitialised value(s)
    ==27636== at 0x8049E33: add_part (in home/c/omg/cdoc.exe)
    ==27636== by 0x804A2FD: doCom (in home/c/omg/cdoc.exe)
    ==27636== by 0x804A767: checkComm (in home/c/omg/cdoc.exe)
    ==27636== by 0x8048E4C: find_files (in home/c/omg/cdoc.exe)
    ==27636== by 0x8048D72: open_file (in home/c/omg/cdoc.exe)
    ==27636== by 0x804961D: args_check (in home/c/omg/cdoc.exe)
    ==27636== by 0x804A9BE: main (in home/c/omg/cdoc.exe)
    ==27636==
    ==27636== 37 errors in context 6 of 7:
    ==27636== Conditional jump or move depends on uninitialised value(s)
    ==27636== at 0x804A941: printComm (in home/c/omg/cdoc.exe)
    ==27636== by 0x8048D77: open_file (in home/c/omg/cdoc.exe)
    ==27636== by 0x804961D: args_check (in home/c/omg/cdoc.exe)
    ==27636== by 0x804A9BE: main (in home/c/omg/cdoc.exe)
    ==27636==
    ==27636== 46 errors in context 7 of 7:
    ==27636== Conditional jump or move depends on uninitialised value(s)
    ==27636== at 0x8049F4C: add_part (in home/c/omg/cdoc.exe)
    ==27636== by 0x804A50E: doCom (in home/c/omg/cdoc.exe)
    ==27636== by 0x804A767: checkComm (in home/c/omg/cdoc.exe)
    ==27636== by 0x8048E4C: find_files (in home/c/omg/cdoc.exe)
    ==27636== by 0x8048D72: open_file (in home/c/omg/cdoc.exe)
    ==27636== by 0x804961D: args_check (in home/c/omg/cdoc.exe)
    ==27636== by 0x804A9BE: main (in home/c/omg/cdoc.exe)
    --27636--
    --27636-- supp: 13 dl-hack3-cond-1
    ==27636==
    ==27636== IN SUMMARY: 145 errors from 7 contexts (suppressed: 13 from 1)
    ==27636==
    ==27636== malloc/free: in use at exit: 0 bytes in 0 blocks.
    ==27636== malloc/free: 72 allocs, 72 frees, 3,197,431 bytes allocated.
    ==27636==
    ==27636== All heap blocks were freed -- no leaks are possible.
    --27636-- memcheck: sanity checks: 9 cheap, 2 expensive
    --27636-- memcheck: auxmaps: 0 auxmap entries (0k, 0M) in use
    --27636-- memcheck: auxmaps_L1: 0 searches, 0 cmps, ratio 0:10
    --27636-- memcheck: auxmaps_L2: 0 searches, 0 nodes
    --27636-- memcheck: SMs: n_issued = 56 (896k, 0M)

    37 comment(s) was/were found.

    The process was successful!
    --27636-- memcheck: SMs: n_deissued = 11 (176k, 0M)
    --27636-- memcheck: SMs: max_noaccess = 65535 (1048560k, 1023M)
    --27636-- memcheck: SMs: max_undefined = 1 (16k, 0M)
    --27636-- memcheck: SMs: max_defined = 19 (304k, 0M)
    --27636-- memcheck: SMs: max_non_DSM = 48 (768k, 0M)
    --27636-- memcheck: max sec V bit nodes: 0 (0k, 0M)
    --27636-- memcheck: set_sec_vbits8 calls: 0 (new: 0, updates: 0)
    --27636-- memcheck: max shadow mem size: 1072k, 1M
    --27636-- translate: fast SP updates identified: 2,578 ( 88.5%)
    --27636-- translate: generic_known SP updates identified: 192 ( 6.5%)
    --27636-- translate: generic_unknown SP updates identified: 141 ( 4.8%)
    --27636-- tt/tc: 5,593 tt lookups requiring 5,656 probes
    --27636-- tt/tc: 5,593 fast-cache updates, 2 flushes
    --27636-- transtab: new 2,587 (55,074 -> 784,627; ratio 142:10) [0 scs]
    --27636-- transtab: dumped 0 (0 -> ??)
    --27636-- transtab: discarded 0 (0 -> ??)
    --27636-- scheduler: 948,361 jumps (bb entries).
    --27636-- scheduler: 9/3,310 major/minor sched events.
    --27636-- sanity: 10 cheap, 2 expensive checks.
    --27636-- exectx: 769 lists, 31 contexts (avg 0 per list)
    --27636-- exectx: 302 searches, 271 full compares (897 per 1000)
    --27636-- exectx: 0 cmp2, 455 cmp4, 0 cmpAll
    --27636-- errormgr: 15 supplist searches, 695 comparisons during search
    --27636-- errormgr: 158 errlist searches, 455 comparisons during search
    Last edited by weaknessforcats; Mar 19 '12, 06:06 AM. Reason: deleted email address.
Working...