瓦尔格林德:注意到但未处理的国际奥克特尔;是否有必要处理以及如何找到?

Valgrind: noted but unhandled ioctl; Is it necessary to handle and how to find?

本文关键字:处理 是否 何找 注意到 林德 未处理      更新时间:2023-10-16

我有一个大型应用程序,我正在检查内存泄漏。我正在使用带有选项的瓦尔格林德--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 调用。我无法阅读官方文档,但此链接没有奇怪的字符。似乎未处理的 ioctl 指的是可以更改内存的 Linux 系统调用。但似乎我不应该担心这些,因为我可以假设 Linux(尽管如果这很重要,我使用的是 Raspberry Pi(正在正确处理内存。

除非它说我的记忆可能会被移动,然后瓦尔格林德就会失去它的踪迹。如果是这种情况,那么处理它是有意义的。但是,如果我需要处理它,那么我怎么知道它指的是哪些功能。显示的消息不涉及任何函数。我可以参考文档来编写包装器函数,但我是否只需要找到我使用某些系统函数并编写包装器的每个实例?

网站的问题应该得到修复。

对没有大小/方向提示的 ioctls 的检查也已修改,现在应该不那么嘈杂。

相关文章: