qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [QAPI+QGA 1/3] Error propagation and JSON parser fix-ups


From: Michael Roth
Subject: [Qemu-devel] [QAPI+QGA 1/3] Error propagation and JSON parser fix-ups
Date: Wed, 1 Jun 2011 12:14:46 -0500

This is Set 1/3 of the QAPI+QGA patchsets.

These patches apply on top of master (5-31), and can also be obtained from:
git://repo.or.cz/qemu/mdroth.git qapi-backport-set1-v1

(Set1+2 are a backport of some of the QAPI-related work from Anthony's
glib tree. The main goal is to get the basic code generation infrastructure in
place so that it can be used by the guest agent to implement a QMP-like guest
interface, and so that future work regarding the QMP conversion to QAPI can be
decoupled from the infrastructure bits. Set3 is the Qemu Guest Agent
(virtagent), rebased on the new code QAPI code generation infrastructure. This
is the first user of QAPI, QMP will follow.)
___

This patchset introduces the following:

 - a new error-handling framework with support for exception-like error
   propagation. This error-handling will be used by QAPI and the guest agent,
   initially, and other users will be converted over time.

 - various hardening of QEMU's json parsing routines, mainly: limits on max
   token size and token count, immediately propagating lexer errors to the
   parser (inducing a NULL qobject to be output) to avoid churning on tokens
   after a lexer error, stricter handling of invalid UTF-8 characters, and
   some minor bug fixes. 

CHANGES SINCE V0 ("QAPI Infrastructure Round 1"):

 - Rebased on Luiz's backport of the error-handling patches
 - Added JSON-related patches

 Makefile        |    4 +-
 Makefile.objs   |    2 +-
 error.c         |  140 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 error.h         |   70 +++++++++++++++++++++++++++
 error_int.h     |   29 +++++++++++
 json-lexer.c    |   47 ++++++++++++++++---
 json-lexer.h    |    1 +
 json-parser.c   |   83 ++++++++++++++++++++++++++++++--
 json-parser.h   |    2 +
 json-streamer.c |   42 +++++++++++++++--
 json-streamer.h |    1 +
 qerror.c        |   59 ++++++++++++++++-------
 qerror.h        |    4 ++
 13 files changed, 446 insertions(+), 38 deletions(-)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]