qemu/hw/i386/amd_iommu.c:188: possible bad shift ?

Bug #1630527 reported by dcb
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Undecided
Unassigned

Bug Description

qemu/hw/i386/amd_iommu.c:188]: (error) Shifting 32-bit value by 64 bits is undefined behaviour

Source code is

    uint64_t mask = ((1 << length) - 1) << bitpos;

Maybe better code

    uint64_t mask = ((1ULL << length) - 1) << bitpos;

Revision history for this message
Thomas Huth (th-huth) wrote :

Thanks for reporting this bug! Looks like this has already been fixed by this commit here:
http://git.qemu.org/?p=qemu.git;a=commitdiff;h=1d5b128cbeeab638f772e

Changed in qemu:
status: New → Fix Committed
Revision history for this message
Thomas Huth (th-huth) wrote :

Released with v2.8

Changed in qemu:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.