Re: [Qemu-devel] [PATCH] migration: don't use uninitialized variables

2013-07-30 Thread Markus Armbruster
Anthony Liguori writes: > On Tue, Jul 30, 2013 at 1:39 AM, Markus Armbruster wrote: >> Anthony Liguori writes: >> >>> This was part of the discussion way back when this all was first >>> introduced. Since everything was open coded and we had to preserve >>> the semantics, that was the only cho

Re: [Qemu-devel] [PATCH] migration: don't use uninitialized variables

2013-07-30 Thread Anthony Liguori
On Tue, Jul 30, 2013 at 1:39 AM, Markus Armbruster wrote: > Anthony Liguori writes: > >> This was part of the discussion way back when this all was first >> introduced. Since everything was open coded and we had to preserve >> the semantics, that was the only choice we had. > > Yes, there is a d

Re: [Qemu-devel] [PATCH] migration: don't use uninitialized variables

2013-07-29 Thread Markus Armbruster
Anthony Liguori writes: > On Mon, Jul 29, 2013 at 7:15 PM, Markus Armbruster wrote: >> Luiz Capitulino writes: >> >>> On Fri, 19 Jul 2013 04:57:51 -0600 >>> Eric Blake wrote: >>> On 07/18/2013 08:36 PM, Pawit Pornkitprasan wrote: > The qmp_migrate method uses the 'blk' and 'inc' para

Re: [Qemu-devel] [PATCH] migration: don't use uninitialized variables

2013-07-29 Thread Anthony Liguori
On Mon, Jul 29, 2013 at 7:15 PM, Markus Armbruster wrote: > Luiz Capitulino writes: > >> On Fri, 19 Jul 2013 04:57:51 -0600 >> Eric Blake wrote: >> >>> On 07/18/2013 08:36 PM, Pawit Pornkitprasan wrote: >>> > The qmp_migrate method uses the 'blk' and 'inc' parameter without >>> > checking if the

Re: [Qemu-devel] [PATCH] migration: don't use uninitialized variables

2013-07-29 Thread Markus Armbruster
Luiz Capitulino writes: > On Fri, 19 Jul 2013 04:57:51 -0600 > Eric Blake wrote: > >> On 07/18/2013 08:36 PM, Pawit Pornkitprasan wrote: >> > The qmp_migrate method uses the 'blk' and 'inc' parameter without >> > checking if they're valid or not (they may be uninitialized if >> > command is rece

Re: [Qemu-devel] [PATCH] migration: don't use uninitialized variables

2013-07-29 Thread Pawit Pornkitprasan
On Tue, Jul 30, 2013 at 5:52 AM, Luiz Capitulino wrote: > > This doesn't apply anymore, can you rebase and resend? > Sure. > By grepping around I can see that there are several instances of > this bug in other commands. I'm surprised we never got a single > bug report about this... Would you min

Re: [Qemu-devel] [PATCH] migration: don't use uninitialized variables

2013-07-29 Thread Luiz Capitulino
On Fri, 19 Jul 2013 04:57:51 -0600 Eric Blake wrote: > On 07/18/2013 08:36 PM, Pawit Pornkitprasan wrote: > > The qmp_migrate method uses the 'blk' and 'inc' parameter without > > checking if they're valid or not (they may be uninitialized if > > command is received via QMP) > > > > Signed-off-b

Re: [Qemu-devel] [PATCH] migration: don't use uninitialized variables

2013-07-29 Thread Luiz Capitulino
On Fri, 19 Jul 2013 11:36:41 +0900 Pawit Pornkitprasan wrote: > The qmp_migrate method uses the 'blk' and 'inc' parameter without > checking if they're valid or not (they may be uninitialized if > command is received via QMP) > > Signed-off-by: Pawit Pornkitprasan > --- > migration.c | 4 ++--

Re: [Qemu-devel] [PATCH] migration: don't use uninitialized variables

2013-07-22 Thread Orit Wasserman
On 07/19/2013 05:36 AM, Pawit Pornkitprasan wrote: > The qmp_migrate method uses the 'blk' and 'inc' parameter without > checking if they're valid or not (they may be uninitialized if > command is received via QMP) > > Signed-off-by: Pawit Pornkitprasan > --- > migration.c | 4 ++-- > 1 file cha

Re: [Qemu-devel] [PATCH] migration: don't use uninitialized variables

2013-07-19 Thread Eric Blake
On 07/19/2013 05:04 AM, Pawit Pornkitprasan wrote: > On Fri, Jul 19, 2013 at 7:57 PM, Eric Blake wrote: >> >> However, wouldn't it be nice if we improved the qapi generator to >> guarantee a sane default value for optional parameters, even when >> has_value is false? >> > > I'm not a qemu expert

Re: [Qemu-devel] [PATCH] migration: don't use uninitialized variables

2013-07-19 Thread Pawit Pornkitprasan
On Fri, Jul 19, 2013 at 7:57 PM, Eric Blake wrote: > > However, wouldn't it be nice if we improved the qapi generator to > guarantee a sane default value for optional parameters, even when > has_value is false? > I'm not a qemu expert or anything, but wouldn't that destroy the point of has_value

Re: [Qemu-devel] [PATCH] migration: don't use uninitialized variables

2013-07-19 Thread Eric Blake
On 07/18/2013 08:36 PM, Pawit Pornkitprasan wrote: > The qmp_migrate method uses the 'blk' and 'inc' parameter without > checking if they're valid or not (they may be uninitialized if > command is received via QMP) > > Signed-off-by: Pawit Pornkitprasan > --- > migration.c | 4 ++-- > 1 file cha