witam,
Mam bardzo prosty program (aż do bólu ;) ):
int main()
{
int x=0;
printf ("x = %d\n", x);
}
i jak wywołuje go pod kątrolą valgrinda:
valgrind --leak-check=yes --run-libc-freeres=no bin/Debug/konsolka
to dostaje takie wyjście:
==5120== Memcheck, a memory error detector.
==5120== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==5120== Using LibVEX rev 1732, a library for dynamic binary translation.
==5120== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==5120== Using valgrind-3.2.3, a dynamic binary instrumentation framework.
==5120== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==5120== For more details, rerun with: -v
==5120==
==5120== Conditional jump or move depends on uninitialised value(s)
==5120== at 0x4DEB1B: _dl_relocate_object (in /lib/ld-2.6.so)
==5120== by 0x4D78DE: dl_main (in /lib/ld-2.6.so)
==5120== by 0x4E7DCA: _dl_sysdep_start (in /lib/ld-2.6.so)
==5120== by 0x4D52B7: _dl_start (in /lib/ld-2.6.so)
==5120== by 0x4D4816: (within /lib/ld-2.6.so)
==5120==
==5120== Conditional jump or move depends on uninitialised value(s)
==5120== at 0x4DEB23: _dl_relocate_object (in /lib/ld-2.6.so)
==5120== by 0x4D78DE: dl_main (in /lib/ld-2.6.so)
==5120== by 0x4E7DCA: _dl_sysdep_start (in /lib/ld-2.6.so)
==5120== by 0x4D52B7: _dl_start (in /lib/ld-2.6.so)
==5120== by 0x4D4816: (within /lib/ld-2.6.so)
==5120==
==5120== Conditional jump or move depends on uninitialised value(s)
==5120== at 0x4DEC65: _dl_relocate_object (in /lib/ld-2.6.so)
==5120== by 0x4D78DE: dl_main (in /lib/ld-2.6.so)
==5120== by 0x4E7DCA: _dl_sysdep_start (in /lib/ld-2.6.so)
==5120== by 0x4D52B7: _dl_start (in /lib/ld-2.6.so)
==5120== by 0x4D4816: (within /lib/ld-2.6.so)
==5120==
(... kilkanaście podobnych komunikatów)
x = 0
==5120==
==5120== ERROR SUMMARY: 15 errors from 8 contexts (suppressed: 0 from 0)
==5120== malloc/free: in use at exit: 1,358 bytes in 1 blocks.
==5120== malloc/free: 1 allocs, 0 frees, 1,358 bytes allocated.
==5120== For counts of detected errors, rerun with: -v
==5120== searching for pointers to 1 not-freed blocks.
==5120== checked 97,528 bytes.
==5120==
==5120== LEAK SUMMARY:
==5120== definitely lost: 0 bytes in 0 blocks.
==5120== possibly lost: 0 bytes in 0 blocks.
==5120== still reachable: 1,358 bytes in 1 blocks.
==5120== suppressed: 0 bytes in 0 blocks.
==5120== Reachable blocks (those to which a pointer was found) are not shown.
==5120== To see them, rerun with: --leak-check=full --show-reachable=yes
Profiling timer expired
I teraz nie rozumiem tych komunikatów:
Conditional jump or move depends on uninitialised value(s)
Z czego wynikają? Można je pominąć albo wyłączyć? (przy większych programach jesy ich znacznie więcej...)
Nie znalazłem odpowiedzi w internecie, a jestem ciekawy odpowiedzi...
Z góry dzięki za wszelkie posty