From: Markus Armbruster <armbru@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH 3/5] json-streamer: remove token queue
Date: Wed, 11 Feb 2026 08:13:58 +0100 [thread overview]
Message-ID: <87y0kz3g7d.fsf@pond.sub.org> (raw)
In-Reply-To: <f7e66270-9d0e-46fb-b465-0b4887287a7f@redhat.com> (Paolo Bonzini's message of "Tue, 10 Feb 2026 09:22:28 +0100")
Paolo Bonzini <pbonzini@redhat.com> writes:
> On 2/10/26 08:58, Markus Armbruster wrote:
>> Paolo Bonzini <pbonzini@redhat.com> writes:
>>
>>> Now fully exploit the push parser, feeding it one token at a time
>>> without having to wait until braces and brackets are balanced.
>>>
>>> While the nesting counts are retained for error recovery purposes,
>>> the system can now report the first parsing error without waiting
>>> for delimiters to be balanced. This also means that JSON_ERROR
>>> can be handled in json-parser.c, not json-streamer.c.
>>>
>>> After reporting the error, json-streamer.c then enters an error recovery
>>> mode where subsequent errors are suppressed. This mimics the previous
>>> error reporting behavior, but it provides prompt feedback on parsing
>>> errors. As an example, here is an example interaction with qemu-ga.
[...]
>>> diff --git a/qobject/json-streamer.c b/qobject/json-streamer.c
>>> index 6c93e6fd78d..a1210128ac1 100644
>>> --- a/qobject/json-streamer.c
>>> +++ b/qobject/json-streamer.c
[...]
>>> + /*
>>> + * Security consideration, we limit total memory allocated per object
>>> + * and the maximum recursion depth that a message can force.
>>> + */
>>
>> This comment now needs rephrasing: there's no recursion anymore. In the
>> previous commit if we're feeling persnickety.
>
> s/recursion/nesting/?
Yup.
[...]
next prev parent reply other threads:[~2026-02-11 7:14 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-07 8:48 [PATCH 0/5] qobject: switch JSON parser to push Paolo Bonzini
2026-01-07 8:48 ` [PATCH 1/5] json-parser: pass around lookahead token, constify Paolo Bonzini
2026-02-06 10:45 ` Markus Armbruster
2026-02-06 10:54 ` Paolo Bonzini
2026-01-07 8:48 ` [PATCH 2/5] json-parser: replace with a push parser Paolo Bonzini
2026-02-09 9:36 ` Markus Armbruster
2026-02-09 10:53 ` Paolo Bonzini
2026-02-12 13:12 ` Markus Armbruster
2026-02-16 16:41 ` Paolo Bonzini
2026-02-17 7:39 ` Markus Armbruster
2026-01-07 8:48 ` [PATCH 3/5] json-streamer: remove token queue Paolo Bonzini
2026-02-10 7:58 ` Markus Armbruster
2026-02-10 8:22 ` Paolo Bonzini
2026-02-11 7:13 ` Markus Armbruster [this message]
2026-01-07 8:48 ` [PATCH 4/5] json-streamer: do not heap-allocate JSONToken Paolo Bonzini
2026-02-10 8:30 ` Markus Armbruster
2026-01-07 8:48 ` [PATCH 5/5] json-parser: add location to JSON parsing errors Paolo Bonzini
2026-02-10 9:21 ` Markus Armbruster
2026-02-10 9:44 ` Paolo Bonzini
2026-02-11 7:18 ` Markus Armbruster
2026-01-21 5:57 ` [PATCH 0/5] qobject: switch JSON parser to push Paolo Bonzini
2026-01-30 13:00 ` Markus Armbruster
2026-01-30 13:36 ` Paolo Bonzini
2026-02-10 13:06 ` Markus Armbruster
2026-02-10 13:12 ` Paolo Bonzini
2026-02-10 15:52 ` Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y0kz3g7d.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.