[Top][All Lists]
[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(-)
- [Qemu-devel] [QAPI+QGA 1/3] Error propagation and JSON parser fix-ups,
Michael Roth <=
- [Qemu-devel] [PATCH v1][ 03/14] Introduce the new error framework, Michael Roth, 2011/06/01
- [Qemu-devel] [PATCH v1][ 09/14] json-parser: detect premature EOI, Michael Roth, 2011/06/01
- [Qemu-devel] [PATCH v1][ 05/14] json-streamer: allow recovery after bad input, Michael Roth, 2011/06/01
- [Qemu-devel] [PATCH v1][ 12/14] json-lexer: make lexer error-recovery more deterministic, Michael Roth, 2011/06/01
- [Qemu-devel] [PATCH v1][ 02/14] QError: Introduce qerror_format(), Michael Roth, 2011/06/01
- [Qemu-devel] [PATCH v1][ 13/14] json-streamer: add handling for JSON_ERROR token/state, Michael Roth, 2011/06/01
- [Qemu-devel] [PATCH v1][ 10/14] json-lexer: reset the lexer state on an invalid token, Michael Roth, 2011/06/01
- [Qemu-devel] [PATCH v1][ 01/14] QError: Introduce qerror_format_desc(), Michael Roth, 2011/06/01
- [Qemu-devel] [PATCH v1][ 04/14] json-parser: propagate error from parser, Michael Roth, 2011/06/01