Bug 104183

Summary: mesa-17.3.0/src/broadcom/qpu/qpu_pack.c:171]: (error) Invalid memcmp() argument
Product: Mesa Reporter: dcb314
Component: Drivers/DRI/vc4Assignee: Eric Anholt <eric>
Status: RESOLVED FIXED QA Contact: Eric Anholt <eric>
Severity: normal    
Priority: medium    
Version: 17.3   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description dcb314 2017-12-09 20:27:55 UTC
mesa-17.3.0/src/broadcom/qpu/qpu_pack.c:171]: (error) Invalid memcmp() argument nr 3. A non-boolean value is required.

Source code is

        return (packed_sig == 0 ||
                memcmp(sig, &v33_sig_map[0], sizeof(*sig) != 0));

Maybe better code

        return (packed_sig == 0 ||
                memcmp(sig, &v33_sig_map[0], sizeof(*sig)) != 0);
Comment 1 Emil Velikov 2018-03-28 17:03:55 UTC
Should be fixed with

commit 49e2586bfc7f806038bba7864dcff0c50fed1fe9
Author: Eric Anholt <eric@anholt.net>
Date:   Thu Dec 14 09:41:16 2017 -0800

    broadcom/vc5: Fix a typo in memcmp for sig unpack checking.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.