qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Anthony PERARD <anthony.perard@citrix.com>
Cc: QEMU Trivial <qemu-trivial@nongnu.org>,
	Stefano Stabellini <stefano.stabellini@citrix.com>,
	QEMU-devel <qemu-devel@nongnu.org>,
	Xen Devel <xen-devel@lists.xen.org>
Subject: Re: [Qemu-devel] [PATCH for v1.6] pc: Fix initialization of the ram_memory variable.
Date: Thu, 29 Aug 2013 09:48:23 +0100	[thread overview]
Message-ID: <CAFEAcA_Hooh5+HoPexLroX4RDNPbnnPvrZ9McVLf=QYHNBugUQ@mail.gmail.com> (raw)
In-Reply-To: <1376664409-2695-1-git-send-email-anthony.perard@citrix.com>

On 16 August 2013 15:46, Anthony PERARD <anthony.perard@citrix.com> wrote:
> In some cases (Xen), it will not be initialized before to be used. This
> leads to segv.
>
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
>
> ---
>
> It works with this simple initialization to NULL, but would it be
> necessary (or better) to assign a proper value to this variables ?

Yes, is this really the right fix? I raised this before 1.6 came
out (since clang complains about it):
http://lists.gnu.org/archive/html/qemu-devel/2013-07/msg05383.html
(though I see I got the sense of the conditional wrong in the
subject line of that mail)

and Stefano suggested the right fix was more complicated
than just passing NULL. Also IIRC if you follow the variable
down then it eventually gets actually used by code, so just
passing NULL sounds wrong.

thanks
-- PMM

  parent reply	other threads:[~2013-08-29  8:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-16 14:46 [Qemu-devel] [PATCH for v1.6] pc: Fix initialization of the ram_memory variable Anthony PERARD
2013-08-26 15:00 ` [Qemu-devel] [Xen-devel] " Fabio Fantoni
2013-08-29  8:32   ` Fabio Fantoni
2013-08-29 10:59     ` Stefano Stabellini
2013-08-29 11:05       ` Stefano Stabellini
2013-08-29  8:48 ` Peter Maydell [this message]
2013-08-29  9:00 ` [Qemu-devel] " Paolo Bonzini
2013-08-29  9:42   ` [Qemu-devel] [Xen-devel] " Fabio Fantoni

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='CAFEAcA_Hooh5+HoPexLroX4RDNPbnnPvrZ9McVLf=QYHNBugUQ@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=anthony.perard@citrix.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=stefano.stabellini@citrix.com \
    --cc=xen-devel@lists.xen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).