在valgrind中可能丢失的是什么意思 [英] What does possible lost means in valgrind

查看:83
本文介绍了在valgrind中可能丢失的是什么意思的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有很多可能会从valgrind中丢失.那是什么意思 ? 当我使用sqlite时,它已经过了良好的测试.我认为这些输入不正确.我做错了什么?

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 0x68CC9E: sqlite3Select (in app_mem.out)
    ==23027==    by 0x6A8644: yy_reduce (in app_mem.out)
    ==23027==    by 0x6AAEAC: sqlite3Parser (in app_mem.out)
    ==23027==    by 0x6AB357: sqlite3RunParser (in app_mem.out)
    ==23027==    by 0x6ADF84: sqlite3Prepare (in app_mem.out)
    ==23027==    by 0x6AE82B: sqlite3LockAndPrepare (in app_mem.out)

推荐答案

在将SQLite与Valgrind结合使用后,我有同样的好奇心,并且遇到了这个错误条目,这表明在SQLite的情况下这是一个误报.看起来SQLite确实确实使用了内部指针,这导致Valgrind做出响应.

I had the same curiosity after using SQLite with Valgrind and came about this bug entry which indicates that in SQLite's case this is a false positive. It would seem that SQLite does indeed use interior-pointers which is causing Valgrind to respond.

错误573688具有新信息-都是可能的泄漏"和误报,因为SQLite将其指针从块的开头移入了8个字节的堆块.最简单的解决方法是扩展Valgrind以抑制可能的泄漏"专门报告;当前您只能抑制所有泄漏,这将是危险的,因为任何SQLite泄漏都不会被捕获.(尽管我认为在此期间这可能是一个合理的步骤.)"

"Bug 573688 has new information -- these are all "possible leaks" and false positives because SQLite moves its pointers to heap blocks 8 bytes in from the start of the block. The easiest way to fix is to extend Valgrind to suppress "possible leak" reports specifically; currently you can only suppress all leaks, which would be dangerous as any SQLite leaks would never be caught. (Though I suppose it could be a reasonable step in the meantime.)"

错误639408-抑制Valgrind运行中的sqlite泄漏

这篇关于在valgrind中可能丢失的是什么意思的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆