From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37789) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEbqj-0006hT-R4 for qemu-devel@nongnu.org; Wed, 28 Aug 2013 05:15:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VEbqf-0005pb-24 for qemu-devel@nongnu.org; Wed, 28 Aug 2013 05:15:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:27038) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEbqe-0005pS-Lr for qemu-devel@nongnu.org; Wed, 28 Aug 2013 05:15:32 -0400 Date: Wed, 28 Aug 2013 11:15:42 +0200 From: Kevin Wolf Message-ID: <20130828091542.GC2743@dhcp-200-207.str.redhat.com> References: <1377275745-8942-1-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1377275745-8942-1-git-send-email-peter.maydell@linaro.org> Subject: Re: [Qemu-devel] [PATCH] block/qcow2.h: Avoid "1LL << 63" (shifts into sign bit) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org, Stefan Hajnoczi , patches@linaro.org Am 23.08.2013 um 18:35 hat Peter Maydell geschrieben: > The expression "1LL << 63" tries to shift the 1 into the sign bit of a > 'long long', which provokes a clang sanitizer warning: > > runtime error: left shift of 1 by 63 places cannot be represented in type 'long long' > > Use "1ULL << 63" as the definition of QCOW_OFLAG_COPIED instead > to avoid this. For consistency, we also update the other QCOW_OFLAG > definitions to use the ULL suffix rather than LL, though only the > shift by 63 is undefined behaviour. > > Signed-off-by: Peter Maydell Thanks, applied to the block branch. Kevin