From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46105) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avo4e-0000Gn-Jg for qemu-devel@nongnu.org; Thu, 28 Apr 2016 11:41:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1avo4Z-0003JD-0F for qemu-devel@nongnu.org; Thu, 28 Apr 2016 11:41:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59254) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avo4Y-0003J0-Ri for qemu-devel@nongnu.org; Thu, 28 Apr 2016 11:41:46 -0400 References: <1461801715-24307-1-git-send-email-eblake@redhat.com> <1461801715-24307-3-git-send-email-eblake@redhat.com> <87pot9or8r.fsf@dusky.pond.sub.org> <57220957.1050608@redhat.com> From: Eric Blake Message-ID: <57222F38.5050701@redhat.com> Date: Thu, 28 Apr 2016 09:41:44 -0600 MIME-Version: 1.0 In-Reply-To: <57220957.1050608@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="xttiUPDxAEFh4laam1W18cox4Ga58ihv5" Subject: Re: [Qemu-devel] [PATCH v15 02/23] qapi: Guarantee NULL obj on input visitor callback error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-devel@nongnu.org, Michael Roth This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --xttiUPDxAEFh4laam1W18cox4Ga58ihv5 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 04/28/2016 07:00 AM, Eric Blake wrote: >> The commit message lists start_struct(), start_alternate(), next_list(= ), >> type_str(), and type_any(). You cover them except for next_list(). W= hy >> is that missing? >=20 > Because *obj can be NULL after next_list() if the list is empty. But > there may still be a weaker assertion worth having: if err, then *obj > must be NULL; and if *obj, then err must not be set (weaker in that for= > all the other functions touched, exactly one of the two conditions can > result, but here, !err and !*obj is valid as a third condition). Actually, because visit_next_list() can't fail (we removed the errp argument earlier). When we finally move the list head allocation into visit_start_list later in the series (22/23), then we should add the (weaker) assert there. >=20 > Depending on what else you find later in the series, I may just post a > fixup for this patch. Still my plan. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --xttiUPDxAEFh4laam1W18cox4Ga58ihv5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXIi84AAoJEKeha0olJ0NqKBsIAKBWz27QokVT30bnsHYTw2wi aGKRTN62Gj9hRHWlv2CMcYEi8kP51wALzLaFA5KHhqeoDwpN07vtVt4hteYtHT2P mlzGAwJTy68nWCaygYHgsZLDBZILGZIOCQ3tmrGgiKqtfu8XDo+YdytpoCiOv78K sCWDbKv0bwTv24zsPMpx3qWhvYZen35cxRj2bC0Q04g1xMRrLkj3Bs9vAYD0HMov dRgErjKdF/yhwryDdvXwX53pvkfx5eN/aNBHOBQheCPJufEWCKZCqpZ5mCYbz71c qW51LWLsD3X2IzboRDt3rkigF11D21ifpYL+kMTsyHpcCM7L8WF+fAwEI3bZYiQ= =FiV3 -----END PGP SIGNATURE----- --xttiUPDxAEFh4laam1W18cox4Ga58ihv5--