From: "Alex Bennée" <alex.bennee@linaro.org>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: qemu-devel@nongnu.org, "Ani Sinha" <anisinha@redhat.com>,
"Gerd Hoffman" <kraxel@redhat.com>,
"Fabiano Rosas" <farosas@suse.de>,
"Laurent Vivier" <lvivier@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Stefano Garzarella" <sgarzare@redhat.com>,
"Jared Rossi" <jrossi@linux.ibm.com>,
"Zhuoying Cai" <zycai@linux.ibm.com>,
"Christian Borntraeger" <borntraeger@linux.ibm.com>,
"Jason Herne" <jjherne@linux.ibm.com>,
"Halil Pasic" <pasic@linux.ibm.com>,
"Eric Farman" <farman@linux.ibm.com>,
"Matthew Rosato" <mjrosato@linux.ibm.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Ilya Leoshkevich" <iii@linux.ibm.com>,
"David Hildenbrand" <david@kernel.org>,
"Cornelia Huck" <cohuck@redhat.com>,
qemu-s390x@nongnu.org,
"Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>,
"Bin Meng" <bmeng.cn@gmail.com>,
qemu-block@nongnu.org
Subject: Re: [PATCH v2 8/9] tests/exynos4210_uart_fifo-test: fix buffer leaks
Date: Wed, 21 Oct 2026 15:50:16 +0100 [thread overview]
Message-ID: <87y0bryuon.fsf@draig.linaro.org> (raw)
In-Reply-To: <CAMxuvawMwiz5=Wpa6C+e3OA7eNZpTTDv9OS215qX9Ju8gwo=-g@mail.gmail.com> ("Marc-André Lureau"'s message of "Wed, 21 Oct 2026 15:38:09 +0400")
Marc-André Lureau <marcandre.lureau@redhat.com> writes:
> Hi
>
> On Wed, Oct 21, 2026 at 3:21 PM Alex Bennée <alex.bennee@linaro.org> wrote:
>>
>> Marc-André Lureau <marcandre.lureau@redhat.com> writes:
>>
>> > Reported by ASAN.
>> >
>> > Fixes: 6d459c75cfc4 ("tests/qtest: add test for exynos4210 uart fifo overflow bug")
>> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>> > ---
>> > tests/qtest/exynos4210_uart_fifo-test.c | 6 ++----
>> > 1 file changed, 2 insertions(+), 4 deletions(-)
>> >
>> > diff --git a/tests/qtest/exynos4210_uart_fifo-test.c b/tests/qtest/exynos4210_uart_fifo-test.c
>> > index 54c09a6de723..c336ed22b028 100644
>> > --- a/tests/qtest/exynos4210_uart_fifo-test.c
>> > +++ b/tests/qtest/exynos4210_uart_fifo-test.c
>> > @@ -52,8 +52,8 @@ static void enable_uart_fifo(QTestState *qts)
>> > */
>> > static void test_recv_large_str(void)
>> > {
>> > - int sock_fd;
>> > - char *sendbuf, *recvbuf;
>> > + g_autofd int sock_fd = -1;
>> > + g_autofree char *sendbuf = NULL, *recvbuf = NULL;
>> > QTestState *qts = qtest_init_with_serial("-M smdkc210", &sock_fd);
>> >
>> > enable_uart_fifo(qts);
>> > @@ -71,8 +71,6 @@ static void test_recv_large_str(void)
>> > g_assert_true(TEST_BUFFER_LEN - 1 == strlen(recvbuf));
>> > g_assert_true(strcmp(sendbuf, recvbuf) == 0);
>> >
>> > - close(sock_fd);
>> > -
>>
>> Did the close(sock_fd) fail or is this just adding another auto free
>> while cleaning up the buffer pointers? Anyway:
>>
>> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
>
> No, it's just a cleanup while touching this code. We can remove it, or
> adjust the commit message
its fine to tweak the commit message...
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
next prev parent reply other threads:[~2026-10-21 14:50 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-21 7:51 [PATCH v2 0/9] Various ASAN & tests fixes Marc-André Lureau
2026-10-21 7:51 ` [PATCH v2 1/9] tests/launchupdate-test: correct g_auto usage Marc-André Lureau
2026-10-21 7:51 ` [PATCH v2 2/9] tests/launchupdate-test: correctly release qs Marc-André Lureau
2026-10-21 7:51 ` [PATCH v2 3/9] tests/launchupdate-test: fix fw_cfg leak Marc-André Lureau
2026-10-21 7:51 ` [PATCH v2 4/9] igvm: release found memory region on success Marc-André Lureau
2026-10-21 7:51 ` [PATCH v2 5/9] igvm: make IgvmMemoryRegion a QOM Marc-André Lureau
2026-10-21 7:51 ` [PATCH v2 6/9] hw/s390x/ipl: fix short SCSI loadparm buffer over-read Marc-André Lureau
2026-10-21 7:51 ` [PATCH v2 7/9] glib-compat: fix g_autofd fallback warnings Marc-André Lureau
2026-10-21 11:19 ` Alex Bennée
2026-10-21 7:51 ` [PATCH v2 8/9] tests/exynos4210_uart_fifo-test: fix buffer leaks Marc-André Lureau
2026-10-21 11:21 ` Alex Bennée
2026-10-21 11:38 ` Marc-André Lureau
2026-10-21 14:50 ` Alex Bennée [this message]
2026-10-21 7:51 ` [PATCH v2 9/9] tests/xilinx-zynq-sdhci-test: fix GIOChannel leak Marc-André Lureau
2026-10-21 8:58 ` Philippe Mathieu-Daudé
2026-10-21 13:49 ` [PATCH v2 0/9] Various ASAN & tests fixes Gerd Hoffman
2026-10-21 16:24 ` Gerd Hoffman
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=87y0bryuon.fsf@draig.linaro.org \
--to=alex.bennee@linaro.org \
--cc=anisinha@redhat.com \
--cc=bmeng.cn@gmail.com \
--cc=borntraeger@linux.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@kernel.org \
--cc=farman@linux.ibm.com \
--cc=farosas@suse.de \
--cc=iii@linux.ibm.com \
--cc=jjherne@linux.ibm.com \
--cc=jrossi@linux.ibm.com \
--cc=kraxel@redhat.com \
--cc=lvivier@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mjrosato@linux.ibm.com \
--cc=pasic@linux.ibm.com \
--cc=pbonzini@redhat.com \
--cc=philmd@oss.qualcomm.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=sgarzare@redhat.com \
--cc=zycai@linux.ibm.com \
/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.