How can I use valgrind with Python C++ extensions?

Yes, you can use valgrind with Python. You just need to use the valgrind suppression file provided by the Python developers, so you don’t get a bunch of false positives due to Python’s custom memory allocation/reallocation functions. The valgrind suppression file can be found here: http://svn.python.org/projects/python/trunk/Misc/valgrind-python.supp IMPORTANT: You need to uncomment the lines for PyObject_Free … Read more

Are there any alternatives to valgrind on Mac OS X Mountain Lion and Mavericks to detect memory leaks for C/C++ applications? [closed]

On 2013-11-01, the valgrind team announced Valgrind 3.9.0: We are pleased to announce a new release of Valgrind, version 3.9.0, available from http://www.valgrind.org. 3.9.0 is a feature release with many improvements and the usual collection of bug fixes. This release adds support for MIPS64/Linux, Intel AVX2 instructions and POWER8 instructions. DFP support has been added … Read more

pthread_exit vs. return

The following minimal test case exhibits the behaviour you describe: #include <pthread.h> #include <unistd.h> void *app1(void *x) { sleep(1); pthread_exit(0); } int main() { pthread_t t1; pthread_create(&t1, NULL, app1, NULL); pthread_join(t1, NULL); return 0; } valgrind –leak-check=full –show-reachable=yes shows 5 blocks allocated from functions called by pthread_exit() that is unfreed but still reachable at process … Read more

Valgrind on macOS Sierra

You can download Valgrind’s latest version from their website. Then, you can just ./autogen.sh to install Valgrind. I personally did not encounter anything needed to make. However, the sad news is, even the most recent version of Valgrind is not very usable on Mac OS Sierra. The reason is that Apple has not released the … Read more

Memory/Address Sanitizer vs Valgrind

I think you’ll find this wiki useful. TLDR main advantages of sanitizers are much smaller CPU overheads (Lsan is practically free, UBsan/Isan is 1.25x, Asan and Msan are 2-4x for computationally intensive tasks and 1.05-1.1x for GUIs, Tsan is 5-15x) wider class of detected errors (stack and global overflows, use-after-return/scope) full support of multi-threaded apps … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)