All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Luiz Capitulino <lcapitulino@redhat.com>,
	John Snow <jsnow@redhat.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Michael Roth <mdroth@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] clang -fsanitize=undefined warnings in the string visitors
Date: Thu, 14 Jan 2016 12:52:51 +0000	[thread overview]
Message-ID: <CAFEAcA8Ac8R_+egy9opa-JfLtSh7ohmJ+gQRbx49UbiHa09tFA@mail.gmail.com> (raw)
In-Reply-To: <56979831.6070204@redhat.com>

On 14 January 2016 at 12:44, Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 14/01/2016 12:15, Peter Maydell wrote:
>> Not that I saw -- ping again, Paolo. This is the only warning
>> that clang's sanitizer currently produces for me, and arithmetic
>> overflows on addition seem genuinely worth investigation...
>
> It happens when the range is 2^64 in size.
>
> Does it still matter if we've decided to use -fwrapv because of left
> shifts?  Or are we still considering the possibility to use -std=gnu89
> (where left shifts give unspecified behavior rather than undefined)?

I think we agreed that we wanted signed shift behaviour if we
could get it, but this is all addition. The code looks a bit
odd to me anyway -- the Range type specifies ranges within a
64-bit address space and thus an unsigned start and end point,
but the code in string-output-visitor.c is specifically using
and feeding in signed values for the start and end.

thanks
-- PMM

  reply	other threads:[~2016-01-14 12:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-23 23:17 [Qemu-devel] clang -fsanitize=undefined warnings in the string visitors Peter Maydell
2015-02-05 17:03 ` Peter Maydell
2015-05-11  8:53   ` Peter Maydell
2015-05-11  9:07     ` Paolo Bonzini
2015-05-29 10:56       ` Peter Maydell
2015-05-29 11:12         ` Paolo Bonzini
2015-10-01 10:47           ` Peter Maydell
2015-10-01 13:38             ` Paolo Bonzini
2015-11-05 20:05               ` John Snow
2016-01-14 11:15                 ` Peter Maydell
2016-01-14 12:44                   ` Paolo Bonzini
2016-01-14 12:52                     ` Peter Maydell [this message]
2015-10-01 14:58             ` Eric Blake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFEAcA8Ac8R_+egy9opa-JfLtSh7ohmJ+gQRbx49UbiHa09tFA@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=jsnow@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.