Re: [Hint]: valgrind outcome concern

Paul FLOYD <[email protected]>
Newsgroups gmane.comp.debugging.valgrind
Message-ID <235833614.3205.1592381915057.JavaMail.www@wwinf1p19>
> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.