[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] qdev-monitor: fix segmentation fault on qdev_de
From: |
Gonglei (Arei) |
Subject: |
Re: [Qemu-devel] [PATCH] qdev-monitor: fix segmentation fault on qdev_device_help() |
Date: |
Wed, 17 Sep 2014 09:17:05 +0000 |
> > >>
> > >> 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. :)
Best regards,
-Gonglei
Re: [Qemu-devel] [PATCH] qdev-monitor: fix segmentation fault on qdev_device_help(), Stefan Hajnoczi, 2014/09/16