Re: [Qemu-devel] qapi-commands.py generates code that uses uninitialized variables

2014-05-20 Thread Peter Maydell
On 20 March 2014 19:21, Michael Roth wrote: > Quoting Markus Armbruster (2014-03-18 04:32:08) >> Peter Maydell writes: >> >> > This is something clang's -fsanitize=undefined spotted. The >> > code generated by qapi-commands.py in qmp-marshal.c for >> > qmp_marshal_* functions where there are some

Re: [Qemu-devel] qapi-commands.py generates code that uses uninitialized variables

2014-04-15 Thread Kevin Wolf
Am 11.04.2014 um 15:11 hat Eric Blake geschrieben: > On 04/11/2014 01:27 AM, Peter Maydell wrote: > > On 11 April 2014 02:40, Eric Blake wrote: > >> We uncovered a real bug that would be fixed by this patch: > >> https://lists.gnu.org/archive/html/qemu-devel/2014-04/msg01745.html > > > > No, that

Re: [Qemu-devel] qapi-commands.py generates code that uses uninitialized variables

2014-04-11 Thread Laszlo Ersek
On 03/20/14 20:21, Michael Roth wrote: > Quoting Markus Armbruster (2014-03-18 04:32:08) >> Peter Maydell writes: >> >>> This is something clang's -fsanitize=undefined spotted. The >>> code generated by qapi-commands.py in qmp-marshal.c for >>> qmp_marshal_* functions where there are some optional

Re: [Qemu-devel] qapi-commands.py generates code that uses uninitialized variables

2014-04-11 Thread Peter Maydell
On 11 April 2014 14:11, Eric Blake wrote: > The called code ALSO needs a fix, but guaranteeing that > 'have_foo==false' implies 'foo==0' is MUCH nicer than 'have_foo==false' > implies 'foo is indeterminate'. For this particular caller, an > indeterminate foo had detrimental effects, and a known f

Re: [Qemu-devel] qapi-commands.py generates code that uses uninitialized variables

2014-04-11 Thread Eric Blake
On 04/11/2014 01:27 AM, Peter Maydell wrote: > On 11 April 2014 02:40, Eric Blake wrote: >> We uncovered a real bug that would be fixed by this patch: >> https://lists.gnu.org/archive/html/qemu-devel/2014-04/msg01745.html > > No, that's a bug in the called code. The API here defines > that for op

Re: [Qemu-devel] qapi-commands.py generates code that uses uninitialized variables

2014-04-11 Thread Fam Zheng
On Fri, 04/11 08:27, Peter Maydell wrote: > On 11 April 2014 02:40, Eric Blake wrote: > > We uncovered a real bug that would be fixed by this patch: > > https://lists.gnu.org/archive/html/qemu-devel/2014-04/msg01745.html > > No, that's a bug in the called code. The API here defines > that for opt

Re: [Qemu-devel] qapi-commands.py generates code that uses uninitialized variables

2014-04-11 Thread Peter Maydell
On 11 April 2014 02:40, Eric Blake wrote: > We uncovered a real bug that would be fixed by this patch: > https://lists.gnu.org/archive/html/qemu-devel/2014-04/msg01745.html No, that's a bug in the called code. The API here defines that for optional parameters, if the have_foo bool is false then t

Re: [Qemu-devel] qapi-commands.py generates code that uses uninitialized variables

2014-04-10 Thread Eric Blake
On 03/28/2014 08:19 AM, Peter Maydell wrote: > On 20 March 2014 19:21, Michael Roth wrote: >> Could it be as simple as this?: >> >> diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py >> index 9734ab0..a70482e 100644 >> --- a/scripts/qapi-commands.py >> +++ b/scripts/qapi-commands.py

Re: [Qemu-devel] qapi-commands.py generates code that uses uninitialized variables

2014-03-28 Thread Peter Maydell
On 20 March 2014 19:21, Michael Roth wrote: > Could it be as simple as this?: > > diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py > index 9734ab0..a70482e 100644 > --- a/scripts/qapi-commands.py > +++ b/scripts/qapi-commands.py > @@ -99,7 +99,7 @@ bool has_%(argname)s = false; >

Re: [Qemu-devel] qapi-commands.py generates code that uses uninitialized variables

2014-03-26 Thread Markus Armbruster
Michael Roth writes: > Quoting Markus Armbruster (2014-03-18 04:32:08) >> Peter Maydell writes: >> >> > This is something clang's -fsanitize=undefined spotted. The >> > code generated by qapi-commands.py in qmp-marshal.c for >> > qmp_marshal_* functions where there are some optional >> > argume

Re: [Qemu-devel] qapi-commands.py generates code that uses uninitialized variables

2014-03-20 Thread Michael Roth
Quoting Markus Armbruster (2014-03-18 04:32:08) > Peter Maydell writes: > > > This is something clang's -fsanitize=undefined spotted. The > > code generated by qapi-commands.py in qmp-marshal.c for > > qmp_marshal_* functions where there are some optional > > arguments looks like this: > > > >

Re: [Qemu-devel] qapi-commands.py generates code that uses uninitialized variables

2014-03-18 Thread Markus Armbruster
Peter Maydell writes: > This is something clang's -fsanitize=undefined spotted. The > code generated by qapi-commands.py in qmp-marshal.c for > qmp_marshal_* functions where there are some optional > arguments looks like this: > > bool has_force = false; > bool force; > > mi = qmp_inp

[Qemu-devel] qapi-commands.py generates code that uses uninitialized variables

2014-03-17 Thread Peter Maydell
This is something clang's -fsanitize=undefined spotted. The code generated by qapi-commands.py in qmp-marshal.c for qmp_marshal_* functions where there are some optional arguments looks like this: bool has_force = false; bool force; mi = qmp_input_visitor_new_strict(QOBJECT(args));