memcheck

What does possible lost means in valgrind

隐身守侯 提交于 2019-12-30 06:41:31
问题 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:

CUDA racecheck, shared memory array and cudaDeviceSynchronize()

左心房为你撑大大i 提交于 2019-12-23 17:40:50
问题 I recently discovered the racecheck tool of cuda-memcheck , available in CUDA 5.0 ( cuda-memcheck --tool racecheck , see the NVIDIA doc). This tool can detect race conditions with shared memory in a CUDA kernel. In debug mode, this tool does not detect anything, which is apparently normal. However, in release mode (-O3), I get errors depending on the parameters of the problem. Here is an error example (initialization of shared memory on line 22, assignment on line 119): ========= ERROR:

Should I worry about “Conditional jump or move depends on uninitialised value(s)”?

心已入冬 提交于 2019-12-19 03:44:05
问题 If you've used Memcheck (from Valgrind) you'll probably be familiar with this message... Conditional jump or move depends on uninitialized value(s) I've read about this and it simply occurs when you use an uninitialized value. MyClass s; s.DoStuff(); This will work because s is automatically initialized... So if this is the case, and it works, why does Memcheck tell me that it's uninitialized? Should the message be ignored? Perhaps I misunderstood where the error was directing me. From the

Valgrind 8 bytes inside a block of 16 free'd

て烟熏妆下的殇ゞ 提交于 2019-12-12 20:46:17
问题 I'm writing code for a lab in class, which is an exercise in OOD design using a circular linked list. This just means that a few key functions that are used aren't accessible to me. However, I'm mostly confused because although my driver mimics the one written by the professor, I'm still getting the mchk error in the title. Here is the code it references { int nNodesFreed{0}; node* n{head}; for(; n!= head || ! nNodesFreed; n = n->next) { delete n; nNodesFreed++; } cout << "# nodes freed: " <<

How to pass arguments to memcheck with ctest?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 03:06:10
问题 I want to use ctest from the command line to run my tests with memcheck and pass in arguments for the memcheck command. I can run ctest -R my_test to run my test, and I can even run ctest -R my_test -T memcheck to run it through memcheck. But I can't seem to find a way to pass arguments to that memcheck command, like --leak-check=full or --suppressions=/path/to/file . After reading ctest's documentation I've tried using the -D option with CTEST_MEMCHECK_COMMAND_OPTIONS and MEMCHECK_COMMAND

Valgrind claims there is unfreed memory. Is this bad?

纵然是瞬间 提交于 2019-12-01 09:07:00
Valgrind gives me the following leak summary on my code. However, I have freed all malloc'ed memory. Is this a bad thing, or is this normal? My program is in c. ==3513== LEAK SUMMARY: ==3513== definitely lost: 0 bytes in 0 blocks. ==3513== possibly lost: 0 bytes in 0 blocks. ==3513== still reachable: 568 bytes in 1 blocks. ==3513== suppressed: 0 bytes in 0 blocks. The valgrind message still reachable: 568 bytes in 1 blocks. means that there was memory freed in your application which is still "reachable", which means that you still have a pointer to it somewhere. At shutdown, this probably

Valgrind claims there is unfreed memory. Is this bad?

若如初见. 提交于 2019-12-01 07:47:20
问题 Valgrind gives me the following leak summary on my code. However, I have freed all malloc'ed memory. Is this a bad thing, or is this normal? My program is in c. ==3513== LEAK SUMMARY: ==3513== definitely lost: 0 bytes in 0 blocks. ==3513== possibly lost: 0 bytes in 0 blocks. ==3513== still reachable: 568 bytes in 1 blocks. ==3513== suppressed: 0 bytes in 0 blocks. 回答1: The valgrind message still reachable: 568 bytes in 1 blocks. means that there was memory freed in your application which is

dump valgrind data

混江龙づ霸主 提交于 2019-12-01 05:16:57
I am using valgrind on a program which runs an infinite loop. As memcheck displays the memory leaks after the end of the program, but as my program has infinite loop it will never end. So is there any way i can forcefully dump the data from valgrind time to time. Thanks acm Have a look at the client requests feature of memcheck . You can probably use VALGRIND_DO_LEAK_CHECK or similar. EDIT : In response to the statement above that this doesn't work. Here is an example program which loops forever: #include <valgrind/memcheck.h> #include <unistd.h> #include <cstdlib> int main(int argc, char*

dump valgrind data

可紊 提交于 2019-12-01 02:24:00
问题 I am using valgrind on a program which runs an infinite loop. As memcheck displays the memory leaks after the end of the program, but as my program has infinite loop it will never end. So is there any way i can forcefully dump the data from valgrind time to time. Thanks 回答1: Have a look at the client requests feature of memcheck . You can probably use VALGRIND_DO_LEAK_CHECK or similar. EDIT : In response to the statement above that this doesn't work. Here is an example program which loops

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