valgrind

What does possible lost means in valgrind

与世无争的帅哥 提交于 2019-11-30 20:38:29
I have a lot of possible lost entry from valgrind. What does that mean ? As I am using sqlite and it is well tested. I don't think these are correct entry. What I am doing wrong ? 16 bytes in 1 blocks are possibly lost in loss record 30 of 844 ==23027== at 0x4A05E1C: malloc (vg_replace_malloc.c:195) ==23027== by 0x6525BE: sqlite3MemMalloc (in app_mem.out) ==23027== by 0x63C579: mallocWithAlarm (in app_mem.out) ==23027== by 0x63C904: sqlite3DbMallocRaw (in app_mem.out) ==23027== by 0x6886D6: codeOneLoopStart (in app_mem.out) ==23027== by 0x68A9C8: sqlite3WhereBegin (in app_mem.out) ==23027== by

Memory debugging tools for Android NDK C++ code

和自甴很熟 提交于 2019-11-30 17:38:47
Does anyone know of memory debugging tools (like Valgrind) for native C++ code under Android NDK? We have a project that uses quite a bit of native code. As hinted in one of the comments for the question, the best approach is to test that code on another environment. We have a separate project that builds in Linux and calls the C/C++ functions we use in our Android code. Once you are at that point, all the nice tools you are used to (gdb, Valgrind, etc.) are available to you. A lot more productive than doing the same thing on the phone (assuming you could even find a good tool). The tricky

How do I tell valgrind to memcheck forked processes?

江枫思渺然 提交于 2019-11-30 16:50:14
I have a process x that I want to check for leaks with valgrind . The problem is that x is run by y , and y in turn is run by z . I can't run x standalone because y and z setup the environment for x , such as environment variables, command line switches, files needed by x etc. Is there any way I can tell valgrind to run on z but to follow any forks it finds and report them too? Is there any way I can tell valgrind to follow any forks but only report on the process named x ? Is there any way I can tell valgrind to attach to already-running process, the way I can do with gdb? I don't know if

Valgrind cross compilation for ARMv5tel

孤人 提交于 2019-11-30 15:08:08
问题 I ran configure with the following option: ./configure --target=armv5tel CC=arm-linux-gnueabi-gcc --host=i686-linux then ran make I encountered the following error: m_cpuid.S: Assembler messages: m_cpuid.S:40: Error: bad instruction `pushl %ebp' m_cpuid.S:41: Error: bad instruction `movl %esp,%ebp' m_cpuid.S:42: Error: bad instruction `pushl %ecx' m_cpuid.S:43: Error: bad instruction `pushfl' m_cpuid.S:44: Error: bad instruction `pushfl' m_cpuid.S:45: Error: bad instruction `popl %eax' m

Heap corruption not detected by Valgrind or Electric Fence. Should I be suspicious? (C++)

女生的网名这么多〃 提交于 2019-11-30 14:30:56
I recently encountered my first battle (solved) with heap corruption. On my linux machine at home the culprit code exits without error using valgrind and electric-fence(with gdb). Yet on the windows machine in our lab, I consistently get the heap corruption related error message from VS described in my referenced post. Is it surprising (or at least uncommon) that valgrind and electric fence wouldn't detect such a problem? Someone else mentioned a possibly similar bug that eluded valgrind in a answer here . What might be some reasons why this problem wouldn't be detected by these tools? Is

Valgrind cross compilation for ARMv5tel

烈酒焚心 提交于 2019-11-30 13:36:37
I ran configure with the following option: ./configure --target=armv5tel CC=arm-linux-gnueabi-gcc --host=i686-linux then ran make I encountered the following error: m_cpuid.S: Assembler messages: m_cpuid.S:40: Error: bad instruction `pushl %ebp' m_cpuid.S:41: Error: bad instruction `movl %esp,%ebp' m_cpuid.S:42: Error: bad instruction `pushl %ecx' m_cpuid.S:43: Error: bad instruction `pushfl' m_cpuid.S:44: Error: bad instruction `pushfl' m_cpuid.S:45: Error: bad instruction `popl %eax' m_cpuid.S:46: Error: bad instruction `movl %eax,%ecx' m_cpuid.S:47: Error: bad instruction `xorl $0x200000,

Clang with -faddress-sanitizer on Windows

我的梦境 提交于 2019-11-30 11:59:24
My intent is to use Clang as a replacement for Valgrind on Windows to find buffer overflows, dynamic memory misuse etc. in C/C++ programs that I've written. I have successfully built Clang following the instructions provided here . I attempted to compile a simple C program with the -faddress-sanitizer option (as specified here ) and the following the error is thrown - gcc.exe: error: unrecognized command line option '-faddress-sanitizer' Using built-in specs. COLLECT_GCC=C:/MinGW/bin/gcc.exe Target: mingw32 Configured with: ../gcc-4.7.0/configure --enable-languages=c,c++,ada,fortran,objc,obj-

Make valgrind stop immediately after first error

别说谁变了你拦得住时间么 提交于 2019-11-30 11:19:46
my program processes large errors and during development in produces large amount of output on the console. It suffers from memory corruption and I try to use valgrind to locate the error. Unfortunately, i can't find the error messages among the output lines, and they flushing by too fast to cancel execution when they pop up. They have to be there in order to locate the error ( which element does cause the error and so on ). Redirecting then within my program doesn't work, just like piping the output does only redirect the program output, not the valgrind output. Can you give me a hint how to

Building massif-visualizer: include could not find load file CMakeFindDependencyMacro

无人久伴 提交于 2019-11-30 09:08:07
问题 I am attempting to build massif-visualizer on CentOS 7. Unfortunately I'm having to try to guess at dependencies as they are not all listed in the INSTALL file. So far: yum install git yum install kdelibs-devel extra-cmake-modules \ qt5-qtsvg-devel qt5-qtxmlpatterns-devel \ kf5-kparts-devel kf5-karchive-devel git clone https://github.com/KDE/massif-visualizer cd massif-visualizer mkdir build (cd build && cmake .. && make && make install) Those Qt5 and KF5 packages were added to the yum

Segmentation fault in malloc_consolidate (malloc.c) that valgrind doesn't detect [duplicate]

会有一股神秘感。 提交于 2019-11-30 08:47:18
This question already has an answer here: Segfaults in malloc() and malloc_consolidate() 2 answers My program goes in segmentation faults, and I cannot find the cause. The worst part is, the function in question does not always lead to segfault. GDB confirms the bug and yields this backtrace: Program received signal SIGSEGV, Segmentation fault. 0xb7da6d6e in malloc_consolidate (av=<value optimized out>) at malloc.c:5169 5169 malloc.c: No such file or directory. in malloc.c (gdb) bt #0 0xb7da6d6e in malloc_consolidate (av=<value optimized out>) at malloc.c:5169 #1 0xb7da9035 in _int_malloc (av=