Tag Archives: DCA

Valgrind – dynamic code analysis tool – part V – valgrind: failed to start tool ‘memcheck’ for platform …

This post contains certain error message when ‘Valgrind’ is called: valgrind: failed to start tool ‘memcheck’ for platform ‘XXXXXX’: No such file or directory. There is a tricky question – can 32-bit valgrind be run on 64-bit platform? The answer is … Continue reading

Posted in Static Code Analysis | Tagged , , | Leave a comment

Valgrind – dynamic code analysis tool – part IV – DRD

Valgrind – DRD – while Helgrind is the major tool for concurrency issue detection, some options of DRD are also helpful on debugging concurrency issue, especially –exclusive-threshold, used to report mutex locked for long, and –shared-threshold, used to report shared … Continue reading

Posted in Static Code Analysis | Tagged , , , , , | Leave a comment

Valgrind – dynamic code analysis tool – part III – Helgrind

Valgrind – Helgrind – concurrency issue detection. # Helgrind http://valgrind.org/docs/manual/hg-manual.html –tool=helgrind [root@localhost valgrindTest]# cat simpleDataRace.c /* Code from Valgrind Manual */ #include <pthread.h> int var = 0; void* child_fn ( void* arg ) { var++; /* Unprotected relative to parent … Continue reading

Posted in Static Code Analysis | Tagged , , | 1 Comment

Valgrind – dynamic code analysis tool – part II – fd leak

Valgrind – File descriptor (fd) leak detection trial # File descriptor (fd) leak detection –track-fds=yes [root@localhost valgrindTest]# cat fdLeakTry.c /* daveti’s stupid code for fd leak */ #include <stdio.h> int main( int argc, char *argv[]) { FILE *fdPtr = fopen(“daveti.log”, … Continue reading

Posted in Static Code Analysis | Tagged , , | Leave a comment

Valgrind – dynamic code analysis tool – part I – basic trial and hints

We are recently trying to find a tool providing the ability for concurrency issue detection. For this topic, generally, I believe in 3 steps: 1. CPR (capacity, performance, redundancy) testing, 2. Static code analysis, 3. Dynamic code analysis. CPR testing … Continue reading

Posted in Static Code Analysis | Tagged , , , | 1 Comment