From: Peter Maydell <peter.maydell@linaro.org>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: Corey Minyard <cminyard@mvista.com>,
qemu-arm <qemu-arm@nongnu.org>, qemu-ppc <qemu-ppc@nongnu.org>,
QEMU Developers <qemu-devel@nongnu.org>,
David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PULL 0/6] Vga 20190628 patches
Date: Tue, 2 Jul 2019 18:08:52 +0100 [thread overview]
Message-ID: <CAFEAcA9PvQgGVZNg0ziXL3FnqENbfE2U3HkOPyOORmk38y0HNA@mail.gmail.com> (raw)
In-Reply-To: <20190702164835.3lnefzrbimltb2h6@sirius.home.kraxel.org>
On Tue, 2 Jul 2019 at 17:48, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> On Tue, Jul 02, 2019 at 02:47:12PM +0100, Peter Maydell wrote:
> > On Tue, 2 Jul 2019 at 10:17, Peter Maydell <peter.maydell@linaro.org> wrote:
> > Hmm, the bitbang-i2c changes in this pull seem to have broken
> > patchew's asan build:
> > https://patchew.org/logs/20190628103957.9504-1-kraxel@redhat.com/testing.asan/?type=message
> >
> > (probably because now we're using and testing the buggy
> > code in a way we weren't before)
>
> Hmm. Yes, gpio_i2c_init() allocates memory (in inlined
> bitbang_i2c_init). There is no exit() function so the
> memory is never freed indeed. On the other hand i2c
> devices are not really hotpluggable, so maybe we only
> need to tag it that way?
The problem is that the qmp 'introspect this device' commands
do an init-(but not realize)-then-delete cycle, which will leak
memory. This isn't a big thing for real-life use (people don't
repeatedly introspect the same device that they can't usefully
use dynamically anyway), but it does get exercised by 'make check',
which is why the sanitizer complains.
I've just sent a patch which tries to fix this by switching
to making it initialize an inlined struct rather than allocating
memory for it.
thanks
-- PMM
prev parent reply other threads:[~2019-07-02 18:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-28 10:39 [Qemu-devel] [PULL 0/6] Vga 20190628 patches Gerd Hoffmann
2019-06-28 10:39 ` [Qemu-devel] [PULL 1/6] i2c: Move bitbang_i2c.h to include/hw/i2c/ Gerd Hoffmann
2019-06-29 5:02 ` David Gibson
2019-06-28 10:39 ` [Qemu-devel] [PULL 2/6] ati-vga: Implement DDC and EDID info from monitor Gerd Hoffmann
2019-06-28 10:39 ` [Qemu-devel] [PULL 3/6] ati-vga: Fixes to offset and pitch registers Gerd Hoffmann
2019-06-28 10:39 ` [Qemu-devel] [PULL 4/6] seabios: add config for ati vgabios Gerd Hoffmann
2019-06-28 10:39 ` [Qemu-devel] [PULL 5/6] seabios: add ati vgabios binary Gerd Hoffmann
2019-06-28 10:39 ` [Qemu-devel] [PULL 6/6] ati-vga: switch to vgabios-ati.bin Gerd Hoffmann
2019-07-02 16:20 ` Bruce Rogers
2019-06-28 11:27 ` [Qemu-devel] [PULL 0/6] Vga 20190628 patches no-reply
2019-07-02 9:17 ` Peter Maydell
2019-07-02 13:47 ` Peter Maydell
2019-07-02 16:48 ` Gerd Hoffmann
2019-07-02 17:08 ` Peter Maydell [this message]
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=CAFEAcA9PvQgGVZNg0ziXL3FnqENbfE2U3HkOPyOORmk38y0HNA@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=cminyard@mvista.com \
--cc=david@gibson.dropbear.id.au \
--cc=kraxel@redhat.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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 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).