Re: [Qemu-block] [PATCH v1 3/6] qapi: assert that visitor impls have required callbacks

2016-06-07 Thread Daniel P. Berrange
On Tue, Jun 07, 2016 at 09:40:25AM -0600, Eric Blake wrote: > On 06/07/2016 04:11 AM, Daniel P. Berrange wrote: > > Not all visitor implementations supply the full set of > > visitor callback functions. For example, the string > > output visitor does not provide 'start_struct' and > > friends. If y

Re: [Qemu-block] [PATCH v1 3/6] qapi: assert that visitor impls have required callbacks

2016-06-07 Thread Eric Blake
On 06/07/2016 04:11 AM, Daniel P. Berrange wrote: > Not all visitor implementations supply the full set of > visitor callback functions. For example, the string > output visitor does not provide 'start_struct' and > friends. If you don't know this and feed it an object > that uses structs, you'll g

[Qemu-block] [PATCH v1 3/6] qapi: assert that visitor impls have required callbacks

2016-06-07 Thread Daniel P. Berrange
Not all visitor implementations supply the full set of visitor callback functions. For example, the string output visitor does not provide 'start_struct' and friends. If you don't know this and feed it an object that uses structs, you'll get a crash: Segmentation fault (core dumped) Crashing is