qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>,
	qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: Jackson Donaldson <jcksn@duck.com>
Subject: Re: [PATCH] hw/char/max78000_uart: Destroy FIFO on deinit
Date: Thu, 28 Aug 2025 10:50:05 +0200	[thread overview]
Message-ID: <c2274ce1-65ee-4238-81f8-7bd6be5491d8@linaro.org> (raw)
In-Reply-To: <20250821154358.2417744-1-peter.maydell@linaro.org>

On 21/8/25 17:43, Peter Maydell wrote:
> In the max78000_uart we create a FIFO in the instance_init function,
> but we don't destroy it on deinit, so ASAN reports a leak in the
> device-introspect-test:
> 
>      #0 0x561cc92d5de3 in malloc (/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-asan/qemu-system-arm+0x21f1de3) (BuildId: 98fdf9fc85c3beaeca8eda0be8412f1e11b9c6ad)
>      #1 0x70cbf2afab09 in g_malloc (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x62b09) (BuildId: 1eb6131419edb83b2178b682829a6913cf682d75)
>      #2 0x561ccc4c884d in fifo8_create /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-asan/../../util/fifo8.c:27:18
>      #3 0x561cc9744ec9 in max78000_uart_init /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-asan/../../hw/char/max78000_uart.c:241:5
> 
> Add an instance_finalize method to destroy the FIFO.
> 
> Cc: qemu-stable@nongnu.org
> Fixes: d447e4b70295 ("MAX78000: UART Implementation")
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>   hw/char/max78000_uart.c | 7 +++++++
>   1 file changed, 7 insertions(+)

Patch queued, thanks.


      parent reply	other threads:[~2025-08-28  8:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-21 15:43 [PATCH] hw/char/max78000_uart: Destroy FIFO on deinit Peter Maydell
2025-08-22  8:02 ` Philippe Mathieu-Daudé
2025-08-28  8:50 ` Philippe Mathieu-Daudé [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=c2274ce1-65ee-4238-81f8-7bd6be5491d8@linaro.org \
    --to=philmd@linaro.org \
    --cc=jcksn@duck.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --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 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).