]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
And some more follow up for 376956 syswrap of SNDDRV and DRM_IOCTL_VERSION
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Fri, 17 Mar 2017 18:45:23 +0000 (18:45 +0000)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Fri, 17 Mar 2017 18:45:23 +0000 (18:45 +0000)
causing some addresses to be wrongly marked as addressable

Just in case, do the assert after ARG2 has been truncated to 32 bits,
to avoid comparing sign extended requests on 64 bits.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16278

coregrind/m_syswrap/syswrap-linux.c

index 8d2f7d880b914b6ab674ea8659e176d8942082ef..4136f59b4f167f14141eb6093eaae2034459d4b2 100644 (file)
@@ -9013,10 +9013,10 @@ PRE(sys_ioctl)
 
 POST(sys_ioctl)
 {
-   vg_assert(SUCCESS || (FAILURE && VKI_DRM_IOCTL_VERSION == ARG2));
-
    ARG2 = (UInt)ARG2;
 
+   vg_assert(SUCCESS || (FAILURE && VKI_DRM_IOCTL_VERSION == ARG2));
+
    /* --- BEGIN special IOCTL handlers for specific Android hardware --- */
 
    /* BEGIN undocumented ioctls for PowerVR SGX 540 (the GPU on Nexus S) */