我有一个大的应用程序,我正在检查内存泄漏。我正在使用valgrind与选项--leak-check=yes --track-origins=yes
。一个警告的例子:
==2173== Warning: noted but unhandled ioctl 0xc410 with no size/direction hints.
==2173== This could cause spurious value errors to appear.
==2173== See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper.
==2173== Warning: noted but unhandled ioctl 0xc400 with no size/direction hints.
==2173== This could cause spurious value errors to appear.
==2173== See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper.
==2173== Warning: noted but unhandled ioctl 0xc40d with no size/direction hints.
==2173== This could cause spurious value errors to appear.
==2173== See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper.
==2173== Warning: noted but unhandled ioctl 0xc40c with no size/direction hints.
==2173== This could cause spurious value errors to appear.
==2173== See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper.
==2173== Thread 3 VCHIQ completio:
==2173== Use of uninitialised value of size 4
==2173== at 0x7E1E04C: completion_thread (in /opt/vc/lib/libvchiq_arm.so)
==2173== Uninitialised value was created by a stack allocation
==2173== at 0x7E1DF98: completion_thread (in /opt/vc/lib/libvchiq_arm.so)
我想知道我是否需要处理ioctl调用。我不能为此读取official doc,但是this link没有奇怪的字符。看起来未处理的ioctl指的是可以改变内存的Linux系统调用。但是看起来我不应该担心这些,因为我可以假设Linux(尽管我使用的是Raspberry Pi,如果这很重要的话)正在正确地处理内存。
除非它是说我的记忆可能会被转移,然后瓦尔格林会失去它的踪迹。如果是这样的话,那么处理它是有意义的。但如果我需要处理它,那么我怎么知道它引用了哪些函数呢?显示的消息没有引用任何函数。我可以参考文档来编写 Package 器函数,但是我必须找到我使用某个系统函数的每个示例并编写一个 Package 器吗?
1条答案
按热度按时间pes8fvy91#
网站的问题应该得到解决。
对没有大小/方向提示的ioctl的检查也进行了修改,现在噪音应该更小。