Hi Team,

1. Is valgrind use particular format, to show memory leaks like double free
in c code.

2. If we have multiple pointers and some sig abort happens in code, is
valgrind works for that part also.?

Thnks
Kunal
On 17 Jun 2020 13:50, "Paul FLOYD" <pjfl...@wanadoo.fr> wrote:

> Hi Team,

> Q.As for a valgrind usage , is valgrind only checks the memory leakage of
code which hits only?

> Q As for a can valgrind checks the all the code of binary without hitting
rhe scenerio. In code?

Kunal

Broadly speaking, there are two categories of software analysis tools.

1. Static analysis tools. For instance, clang analyzer. See
https://en.wikipedia.org/wiki/List_of_tools_for_static_code_analysis

These tools parse all the code to produce some sort of model and then do
lots of 'what-if' analysis on all code paths.
Advantages: does not depend on your test coverage, can check for very many
kinds of errors.
Disadvantages: tools have to make tradeoffs between runtime and really
checking all possibilities. Also the models
are usually limited in scope which can cause false positives.

2. Dynamic analysis tools like Valgrind. Again wikipedia has a page listing
tools https://en.wikipedia.org/wiki/Dynamic_program_analysis

These tools test running code.
Advantages: lower rate of false positives.
Disadvantage. Only as good as your tests - you should be measuring your
code coverage! Performance - usually there is a large memory and/or runtime
overhead, which can make running
dynamic tools on large applications/data imprectical.

A+
Paul


_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to