[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] schemas: Add vim modeline
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH] schemas: Add vim modeline |
Date: |
Mon, 3 Aug 2020 13:43:59 +0100 |
User-agent: |
Mutt/1.14.5 (2020-06-23) |
On Mon, Aug 03, 2020 at 02:33:36PM +0200, Paolo Bonzini wrote:
> On 03/08/20 14:23, Daniel P. Berrangé wrote:
> > We'd really love to move off YAJL for JSON parsing
>
> What are the issues with YAJL?
It is abandonware for more than 5 years now, with an ever growing list
of bug reports and pull requests being ignored. This isn't good when
the JSON parser is a security critical part of the interface between
libvirt and QEMU.
We tried to switch to Jannsson but that raises hard errors for
values above LLONG_MAX and has no backdoor to workaround this.
There's various other C JSON parsers which have their own flaws
such as C namespace pollution in headers, or same integer parsing
problems.
> >> It could be avoided by using a schema in Libvirt, just like QEMU has no
> >> problem with it on the other side; it's just a different design choice
> >> with different trade-offs, I don't think it's enough of an issue to
> >> declare JSON "the wrong choice of format for QMP".
> >
> > The schema doesn't help - the problem is many JSON parsers don't allow
> > use of full uint64 values when parsing - alot will simply report an
> > error for anything bigger than LLONG_MAX and offer no workaround.
>
> Sure, but this problem is not at all unique to QEMU and JSON parsers
> have a way to support large integers in pretty much every language
> (including Javascript). In some of them like Python or Ruby it's even
> the default behavior.
Some parsers can do it, some cannot, and in some it isn't obvious that
you are loosing precision behind the scenes due to conversion to float.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Re: [PATCH] schemas: Add vim modeline, Markus Armbruster, 2020/08/03
Re: [PATCH] schemas: Add vim modeline, Daniel P . Berrangé, 2020/08/03
Re: [PATCH] schemas: Add vim modeline, Paolo Bonzini, 2020/08/03
Re: [PATCH] schemas: Add vim modeline, Alex Bennée, 2020/08/04