As explained in https://bugs.kde.org/show_bug.cgi?id=331829, when passing
an ioctl request number as an int to a function the request number will
be sign-extended to 64 bits on 64-bit systems. Avoid that this causes
Valgrind to fail to recognize an ioctl by truncating the request number
to 32 bits.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14232
{
*flags |= SfMayBlock;
+ ARG2 = (UInt)ARG2;
+
// We first handle the ones that don't use ARG3 (even as a
// scalar/non-pointer argument).
switch (ARG2 /* request */) {
{
vg_assert(SUCCESS);
+ ARG2 = (UInt)ARG2;
+
/* --- BEGIN special IOCTL handlers for specific Android hardware --- */
# if defined(VGPV_arm_linux_android) || defined(VGPV_x86_linux_android) \