All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: "Marc-André Lureau" <mlureau@redhat.com>
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
	berto@igalia.com, qemu-devel@nongnu.org,
	"Eric Blake" <eblake@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 1/3] qapi: return a 'missing parameter' error
Date: Thu, 22 Sep 2016 13:02:57 +0200	[thread overview]
Message-ID: <87twd8mc2m.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <1730633132.491556.1474474072544.JavaMail.zimbra@redhat.com> ("Marc-André Lureau"'s message of "Wed, 21 Sep 2016 12:07:52 -0400 (EDT)")

Marc-André Lureau <mlureau@redhat.com> writes:

> Hi
>
> ----- Original Message -----
>> Aha, we got a different bug fix!  The old code fails to fail when the
>> parameter doesn't exist.  Instead, it sets *obj = NULL, which seems very
>> likely to crash QEMU.  Let me try... yup:
>> 
>>     { "execute": "object-add",
>>       "arguments": { "qom-type": "memory-backend-file", "id": "foo" } }
>> 
>> Kills QEMU with "qemu/qom/object_interfaces.c:115: user_creatable_add_type:
>> Assertion `qdict' failed."
>> 
>> Either fix this in a separate patch before this one, or cover it in this
>> one's commit message.  Your choice.
>> 
>> A separate patch might be usable for qemu-stable.
>
> It looks to me that this is a different bug. 
>
> visit_type_q_obj_object_add_arg_members() doesn't call visit_type_any() if "props" is missing (it's optionnal).
>
> And arg is zero'ed in qmp-marshal, and the assert() was added in ad739706bbadee49. I am trying to fix that regression.

Okay, that's *also* a bug.

For the bug I spotted, try

  { "execute": "qom-set",
    "arguments": { "path": "/machine", "property": "rtc-time" } }

Trips assert(!err != !*obj) in its caller visit_type_any().

[...]

  reply	other threads:[~2016-09-22 11:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-21 10:36 [Qemu-devel] [PATCH 0/3] qapi: return 'missing parameter' error Marc-André Lureau
2016-09-21 10:36 ` [Qemu-devel] [PATCH 1/3] qapi: return a " Marc-André Lureau
2016-09-21 12:57   ` Alberto Garcia
2016-09-21 14:33   ` Markus Armbruster
2016-09-21 15:05     ` Marc-André Lureau
2016-09-21 16:07     ` Marc-André Lureau
2016-09-22 11:02       ` Markus Armbruster [this message]
2016-09-21 10:36 ` [Qemu-devel] [PATCH 2/3] qapi: clear given pointer Marc-André Lureau
2016-09-21 12:57   ` Alberto Garcia
2016-09-21 14:41   ` Daniel P. Berrange
2016-09-21 15:17     ` Marc-André Lureau
2016-09-21 15:34       ` Daniel P. Berrange
2016-09-21 15:24   ` Markus Armbruster
2016-09-21 10:36 ` [Qemu-devel] [PATCH 3/3] iotests: fix expected error message Marc-André Lureau
2016-09-21 12:58   ` Alberto Garcia
2016-09-21 15:14   ` Markus Armbruster
2016-09-21 15:32     ` Marc-André Lureau

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=87twd8mc2m.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=berto@igalia.com \
    --cc=eblake@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mlureau@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.