[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PULL 00/40] ppc patch queue 2015-06-03
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-ppc] [PULL 00/40] ppc patch queue 2015-06-03 |
Date: |
Fri, 05 Jun 2015 16:35:42 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
On 05/06/2015 15:33, Peter Maydell wrote:
> This is applied, but can you fix the clang sanitizer warnings,
> please?
>
> hw/ppc/spapr_drc.c:59:24: runtime error: left shift of negative value -1
> hw/ppc/spapr_drc.c:587:19: runtime error: left shift of negative value -1
>
> Problem looks to be in:
> #define DRC_INDEX_ID_MASK (~(~0 << DRC_INDEX_TYPE_SHIFT))
>
> which is doing left shifts on a negative signed number.
Speaking in general, I find that this makes code worse. If you're using
~0 you probably want the value to extend with infinite ones.
Using ~0u instead of ~0ull may cause problems down the line, and ~0ul
is even worse because it is not 64-bit safe.
Paolo
- [Qemu-ppc] [PULL 27/40] spapr_events: event-scan RTAS interface, (continued)
- [Qemu-ppc] [PULL 27/40] spapr_events: event-scan RTAS interface, Alexander Graf, 2015/06/03
- [Qemu-ppc] [PULL 28/40] spapr_drc: add spapr_drc_populate_dt(), Alexander Graf, 2015/06/03
- [Qemu-ppc] [PULL 40/40] softmmu: support up to 12 MMU modes, Alexander Graf, 2015/06/03
- [Qemu-ppc] [PULL 19/40] docs: add sPAPR hotplug/dynamic-reconfiguration documentation, Alexander Graf, 2015/06/03
- [Qemu-ppc] [PULL 25/40] spapr_rtas: add ibm, configure-connector RTAS interface, Alexander Graf, 2015/06/03
- [Qemu-ppc] [PULL 32/40] spapr_pci: enable basic hotplug operations, Alexander Graf, 2015/06/03
- [Qemu-ppc] [PULL 26/40] spapr_events: re-use EPOW event infrastructure for hotplug events, Alexander Graf, 2015/06/03
- [Qemu-ppc] [PULL 20/40] spapr_drc: initial implementation of sPAPRDRConnector device, Alexander Graf, 2015/06/03
- Re: [Qemu-ppc] [PULL 00/40] ppc patch queue 2015-06-03, Peter Maydell, 2015/06/04
- Re: [Qemu-ppc] [PULL 00/40] ppc patch queue 2015-06-03, Peter Maydell, 2015/06/05
- Re: [Qemu-ppc] [PULL 00/40] ppc patch queue 2015-06-03,
Paolo Bonzini <=
- Re: [Qemu-ppc] [PULL 00/40] ppc patch queue 2015-06-03, Peter Maydell, 2015/06/05
- Re: [Qemu-ppc] [PULL 00/40] ppc patch queue 2015-06-03, Paolo Bonzini, 2015/06/05
- Re: [Qemu-ppc] [PULL 00/40] ppc patch queue 2015-06-03, Peter Maydell, 2015/06/05
- Re: [Qemu-ppc] [PULL 00/40] ppc patch queue 2015-06-03, Paolo Bonzini, 2015/06/05
- Re: [Qemu-ppc] [PULL 00/40] ppc patch queue 2015-06-03, Peter Maydell, 2015/06/05
- [Qemu-ppc] undefined behavior of signed left shifts (was Re: [PULL 00/40] ppc patch queue 2015-06-03), Paolo Bonzini, 2015/06/05
- Re: [Qemu-ppc] undefined behavior of signed left shifts (was Re: [PULL 00/40] ppc patch queue 2015-06-03), Joseph Myers, 2015/06/05
- Re: [Qemu-ppc] undefined behavior of signed left shifts (was Re: [PULL 00/40] ppc patch queue 2015-06-03), Peter Maydell, 2015/06/05
Re: [Qemu-ppc] [Qemu-devel] [PULL 00/40] ppc patch queue 2015-06-03, Eric Blake, 2015/06/05