6

Valgrind! What are you?!!

Knowledge of C is complete only when you come out of Valgrind with 0 errors in 0 contexts.
Definitely lost I am.

In case you are confused, reaffirming that this is a rant and not a statement.

Comments
  • 0
    I know what it does. But the thing is that I haven't written this library and my task is to check the memory leaks for the library. It is a half cooked python library which we are workig on. It was written in C and then wrapped with Cython which kept SEG faulting. Thus we re-wrote it using CFFI and now it works perfect. But the memory leak is huge. After all the leaks are fixed, we have to then write the documentation. Just overwhelmed by the unconventional/rather uneasy ways of gonding leaks using Valgrind. Rant it is 😀
  • 0
    Juat curious if there isn any procedural methods to Valgrind-ing or is it the beat it till it works policy that I have to follow.

    I have made the display option to be 30 lines. The leak infos are never 30 lines thus made sure that i don't miss any reference to the library if present. If there is no reference to the library that I work on, I check for bug reports of the standard libraries and if I find, I ignore the leak. Happily. Else, I keep researching. Is that a good way to go?
  • 0
    @PenguinRage

    Just curious if pthread_create() has any issues with valgrind.
  • 0
    @PenguinRage
    We are now running pure C code and I find huge losses in memory and ran Valgrind using the drd tool and also hegrind. The errors were too much that Valgrind asked me to check my library and that it is no more diaplaying errors beyond 1000. The errors are mostly tarrying around the libglib-2.0 binaries. The library I believe is not ending a few threads.
Add Comment