From: Markus Armbruster <armbru@redhat.com>
To: "Gonglei (Arei)" <arei.gonglei@huawei.com>
Cc: "Huangweidong (C)" <weidong.huang@huawei.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"Huangpeng (Peter)" <peter.huangpeng@huawei.com>,
"lcapitulino@redhat.com" <lcapitulino@redhat.com>,
"stefanha@redhat.com" <stefanha@redhat.com>,
"imammedo@redhat.com" <imammedo@redhat.com>,
"afaerber@suse.de" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH] qdev-monitor: fix segmentation fault on qdev_device_help()
Date: Wed, 17 Sep 2014 12:06:54 +0200 [thread overview]
Message-ID: <87vbompnlt.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <33183CC9F5247A488A2544077AF1902086DD6BDB@SZXEMA503-MBS.china.huawei.com> (Gonglei's message of "Wed, 17 Sep 2014 09:17:05 +0000")
"Gonglei (Arei)" <arei.gonglei@huawei.com> writes:
>> > >>
>> > >> Doesn't this leak prop_list when local_err && prop_list?
>> > >>
>> > > No, it will not happen this situation.
>> > >
>> > >> Returning both a value in need of destruction and an error object is at
>> > >> least highly unusual, and probably plain wrong.
>> > >>
>> > >> Should qmp_device_list_properties() return NULL when it sets an error?
>> > >
>> > > Yes, it was.
>> >
>> > I think I'm starting to understand now.
>> >
>> > You backtrace shows qmp_device_list_properties() returned null without
>> > setting an error. But this is okay, because null means "empty list",
>> > which is a valid return value.
>> >
>> Yes.
>>
>> > A systematic search for this kind of incorrect error handling would be
>> > nice: search for functions returning QAPI lists, then look for callers
>> > interpreting a null value as error. Would you be willing to do that?
>> >
>> Yes, I would.
>>
> Hi, Markus
> I have finished this work, and not found this kind of error. :)
Thanks!
next prev parent reply other threads:[~2014-09-17 10:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-16 2:19 [Qemu-devel] [PATCH] qdev-monitor: fix segmentation fault on qdev_device_help() arei.gonglei
2014-09-16 7:28 ` Markus Armbruster
2014-09-16 7:38 ` Gonglei (Arei)
2014-09-16 7:59 ` Markus Armbruster
2014-09-16 8:06 ` Gonglei (Arei)
2014-09-17 9:17 ` Gonglei (Arei)
2014-09-17 10:06 ` Markus Armbruster [this message]
2014-09-16 10:25 ` Stefan Hajnoczi
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=87vbompnlt.fsf@blackfin.pond.sub.org \
--to=armbru@redhat.com \
--cc=afaerber@suse.de \
--cc=arei.gonglei@huawei.com \
--cc=imammedo@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=peter.huangpeng@huawei.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=weidong.huang@huawei.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.