Fehler-Zusammenfassung in Valgrind-Ausgabe?

Ich habe gesehen, einige der post über valgrind aber nicht einzelne Beitrag hat mir geholfen im Verständnis der interpretation der valgrind-Ausgabe.
Ich lief zwei Programme mit valgrind (Beide mit memory leaks)

Beispiel-Ausgabe für Test 1

==20422== LEAK SUMMARY:
==20422== definitely lost: 448 bytes in 3 blocks
==20422== indirectly lost: 786,460 bytes in 1 blocks
==20422== possibly lost: 1,576,052 bytes in 46 blocks
==20422== still reachable: 1,077,107 bytes in 2,333 blocks
==20422== suppressed: 0 bytes in 0 blocks
==20422== Rerun with --leak-check=full to see details of leaked memory
==20422==
==20422== For counts of detected and suppressed errors, rerun with: -v
==20422== ERROR SUMMARY: 98307 errors from 5 contexts (suppressed: 2 from 2)
Killed

Ausgabe für Test 2

==20875== HEAP SUMMARY:
==20875== in use at exit: 1,059,198 bytes in 2,047 blocks
==20875== total heap usage: 3,019 allocs, 972 frees, 4,496,090 bytes allocated
==20875==
==20875== LEAK SUMMARY:
==20875== definitely lost: 328 bytes in 2 blocks
==20875== indirectly lost: 0 bytes in 0 blocks
==20875== possibly lost: 1,600 bytes in 5 blocks
==20875== still reachable: 1,057,270 bytes in 2,040 blocks
==20875== suppressed: 0 bytes in 0 blocks
==20875== Rerun with --leak-check=full to see details of leaked memory
==20875==
==20875== For counts of detected and suppressed errors, rerun with: -v
==20875== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 2)

Wenn man sich die Fehler Inhaltsangabe, Eine Ausgabe sagt, es gibt Fehler und der andere sagt es gibt keine Fehler (schließlich haben beide Lecks)

Meine Frage ist - was zählt als Fehler in valgrind? (valgrind-Handbuch hat mir nicht geholfen)

Sie sollten, hatten einige Fehlermeldungen z.B. ungültige Lesen, bevor das Leck Zusammenfassung in Ausgabe 1 ist, sondern 2 unterdrückt wurden
es war lange Liste Ungültiger Lesen und schreiben in den ersten code.
Sind Sie mit OSX durch Zufall?

InformationsquelleAutor Meluha | 2013-07-01

Schreibe einen Kommentar