https://bugs.kde.org/show_bug.cgi?id=498143
Bug ID: 498143 Summary: False positive on EVIOCGRAB ioctl. Classification: Developer tools Product: valgrind Version: 3.23.0 Platform: Debian unstable OS: Linux Status: REPORTED Severity: minor Priority: NOR Component: general Assignee: jsew...@acm.org Reporter: me@tali.network Target Milestone: --- The EVIOCGRAB ioctl takes as argument just one parameter and tests whether it's truthy: It does *not* dereference the argument. Valgrind, however, doesn't agree, and logs a warning like the following when one calls ioctl(fd, EVIOCGRAB, 1): ``` ==6155== Thread 3: ==6155== Syscall param ioctl(generic) points to unaddressable byte(s) ==6155== at 0x4A9723B: ioctl (ioctl.c:36) ... ==6155== Address 0x1 is not stack'd, malloc'd or (recently) free'd ``` STEPS TO REPRODUCE 1. Run valgrind on a program that calls ioctl(some_fd, EVIOCGRAB, 1); (or any other truthy value) OBSERVED RESULT False positive warning. EXPECTED RESULT No warning; this is safe code. SOFTWARE/OS VERSIONS This is on Debian Sid, but I've reproduced it on Fedora as well. This affects (at least) Linuxes 6.12.4 and 6.12.6. Valgrind v3.2.0 and 3.24.0. ADDITIONAL INFORMATION Let me know if there's any other info I can provide. Thanks :) -- You are receiving this mail because: You are watching all bug changes.