qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC] New Migration Protocol using Visitor Interface


From: Anthony Liguori
Subject: Re: [Qemu-devel] [RFC] New Migration Protocol using Visitor Interface
Date: Mon, 03 Oct 2011 09:56:47 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.21) Gecko/20110831 Lightning/1.0b2 Thunderbird/3.1.13

On 10/03/2011 09:18 AM, Michael S. Tsirkin wrote:
skip_indefinite:
   while tag != CANARY:
     if tag == INT:
       visit_type_int(v, NULL, NULL, errp);
     elif tag == STRING:
       visit_type_str(v, NULL, NULL, errp);
     elif tag == INDEFINITE:
       visit_start_struct(v, NULL, NULL, errp);
       skip_indefinite(v, errp);
       visit_end_struct(v, NULL, NULL, errp);

end_struct:
   v->skip = true;
   skip_indefinite(v, errp);
   v->skip = false;

Regards,

Anthony Liguori

This implementation is recursive, which has the problem
of wasting unlimited resources to skip bad input.
And we really do not need to look at tag at all. Just
the length.

That's just one implementation. You could certainly do a non-recursive implementation.

Regards,

Anthony Liguori






reply via email to

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