Re: [Qemu-devel] [PATCH v3 2/7] qapi: correctly parse uint64_t values from strings

2018-11-03 Thread David Gibson
On Wed, Oct 31, 2018 at 06:18:33PM +0100, David Hildenbrand wrote: > On 31.10.18 15:32, Markus Armbruster wrote: > > David Hildenbrand writes: > > > >> Right now, we parse uint64_t values just like int64_t values, resulting > >> in negative values getting accepted and certain valid large numbers

Re: [Qemu-devel] [PATCH v3 2/7] qapi: correctly parse uint64_t values from strings

2018-10-31 Thread David Hildenbrand
On 31.10.18 15:44, Markus Armbruster wrote: > Markus Armbruster writes: > >> David Hildenbrand writes: >> >>> Right now, we parse uint64_t values just like int64_t values, resulting >>> in negative values getting accepted and certain valid large numbers only >>> being representable as negative

Re: [Qemu-devel] [PATCH v3 2/7] qapi: correctly parse uint64_t values from strings

2018-10-31 Thread David Hildenbrand
On 31.10.18 15:32, Markus Armbruster wrote: > David Hildenbrand writes: > >> Right now, we parse uint64_t values just like int64_t values, resulting >> in negative values getting accepted and certain valid large numbers only >> being representable as negative numbers. Also, reported errors

Re: [Qemu-devel] [PATCH v3 2/7] qapi: correctly parse uint64_t values from strings

2018-10-31 Thread Markus Armbruster
Markus Armbruster writes: > David Hildenbrand writes: > >> Right now, we parse uint64_t values just like int64_t values, resulting >> in negative values getting accepted and certain valid large numbers only >> being representable as negative numbers. Also, reported errors indicate >> that an

Re: [Qemu-devel] [PATCH v3 2/7] qapi: correctly parse uint64_t values from strings

2018-10-31 Thread Markus Armbruster
David Hildenbrand writes: > Right now, we parse uint64_t values just like int64_t values, resulting > in negative values getting accepted and certain valid large numbers only > being representable as negative numbers. Also, reported errors indicate > that an int64_t is expected. > > Parse

Re: [Qemu-devel] [PATCH v3 2/7] qapi: correctly parse uint64_t values from strings

2018-10-26 Thread David Hildenbrand
> > It's not obvious to me why this looks so different from the code in > parse_type_int64(). Should we be using qemu_strtoi64() in the > pre-existing function, instead of what's there now? The existing function has to be that complicated because it calls into the same function used to parse

Re: [Qemu-devel] [PATCH v3 2/7] qapi: correctly parse uint64_t values from strings

2018-10-25 Thread David Gibson
On Tue, Oct 23, 2018 at 05:23:01PM +0200, David Hildenbrand wrote: > Right now, we parse uint64_t values just like int64_t values, resulting > in negative values getting accepted and certain valid large numbers only > being representable as negative numbers. Also, reported errors indicate > that

[Qemu-devel] [PATCH v3 2/7] qapi: correctly parse uint64_t values from strings

2018-10-23 Thread David Hildenbrand
Right now, we parse uint64_t values just like int64_t values, resulting in negative values getting accepted and certain valid large numbers only being representable as negative numbers. Also, reported errors indicate that an int64_t is expected. Parse uin64_t separately. We don't have to worry