8

I have a large application that I am checking for memory leaks. I am using valgrind with the options --leak-check=yes --track-origins=yes. A sample of the warning:

==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)

I am wondering if I need to handle the ioctl calls. I can't read the official doc for this but this link doesn't have the weird characters. It seems that the unhandled ioctl is referring to Linux system calls that can change memory. But it seems like I shouldn't worry about these because I can assume that Linux (although I'm using Raspberry Pi if that matters) is properly handling the memory.

Unless it is saying that my memory might be moved around and then valgrind will lose track of it. If that's the case, then it makes sense to handle it. But if I need to handle it, then how might I know which functions it is referring to. The message shown doesn't refer to any function. I can refer to the docs for writing wrapper functions but am I just going to have to find every instance that I use some system function and write a wrapper?

Warpstar22
  • 567
  • 4
  • 19
  • Having the exact same problem, did you ever find a resolution? Not sure if it's related or not, but if I use --verbose I get a print statement directly before the warning, Reading syms from /lib/libnss_dns.so.2. So it's still not much to go off of, but I'm guessing there's a call made to that library that makes a call to ioctl. Still an issues as of 3.20 – JoeManiaci Feb 27 '23 at 23:40
  • @JoeManiaci I never found an answer to this question. I chose to ignore it on the project I was working on then. – Warpstar22 Feb 28 '23 at 16:21

1 Answers1

0

The problem with the web site should be fixed.

The check for ioctls with no size/direction hints has also been modified and should now be less noisy.

Paul Floyd
  • 5,530
  • 5
  • 29
  • 43