From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51463) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSsTM-0001WW-2N for qemu-devel@nongnu.org; Thu, 28 Jul 2016 17:04:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSsTH-00050d-Nz for qemu-devel@nongnu.org; Thu, 28 Jul 2016 17:04:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53778) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSsTH-00050X-Fq for qemu-devel@nongnu.org; Thu, 28 Jul 2016 17:03:59 -0400 References: <1469611466-31574-1-git-send-email-silbe@linux.vnet.ibm.com> <57991CC1.40003@redhat.com> <87twfaysit.fsf@dusky.pond.sub.org> <5799E26B.7090408@linux.vnet.ibm.com> <579A1D33.6010500@redhat.com> <579A24BE.2060707@linux.vnet.ibm.com> From: Eric Blake Message-ID: <579A733C.5050306@redhat.com> Date: Thu, 28 Jul 2016 15:03:56 -0600 MIME-Version: 1.0 In-Reply-To: <579A24BE.2060707@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="xko3EfvuMrfXvFffWoKimW7gdejwGqsIp" Subject: Re: [Qemu-devel] [PATCH] error: error_setg_errno(): errno gets preserved List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Halil Pasic , Markus Armbruster Cc: Sascha Silbe , qemu-devel@nongnu.org, Kevin Wolf , Michael Roth , Cornelia Huck , Max Reitz This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --xko3EfvuMrfXvFffWoKimW7gdejwGqsIp From: Eric Blake To: Halil Pasic , Markus Armbruster Cc: Sascha Silbe , qemu-devel@nongnu.org, Kevin Wolf , Michael Roth , Cornelia Huck , Max Reitz Message-ID: <579A733C.5050306@redhat.com> Subject: Re: [Qemu-devel] [PATCH] error: error_setg_errno(): errno gets preserved References: <1469611466-31574-1-git-send-email-silbe@linux.vnet.ibm.com> <57991CC1.40003@redhat.com> <87twfaysit.fsf@dusky.pond.sub.org> <5799E26B.7090408@linux.vnet.ibm.com> <579A1D33.6010500@redhat.com> <579A24BE.2060707@linux.vnet.ibm.com> In-Reply-To: <579A24BE.2060707@linux.vnet.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 07/28/2016 09:29 AM, Halil Pasic wrote: >> You mean va_start, not start_va. And actually, C11 is clear that errn= o >> is unspecified after library functions (but not macros) that don't >> explicitly state otherwise. Since va_start() is a macro and not a >> library function, that means va_start does NOT have carte blanche >> permission to modify errno. For more reading on the topic: >=20 > I also considered this function/macro thing but in the end I am not > aware of anything in C11 what would prohibit va_start to modify errno -= - > correct me if I'm wrong. With that it boils down to 'may' and relying o= n > 'does not' means you are not covered by the standard C11 (but may > be covered by something else -- in which case this should be documented= > in HACKING). >=20 >> >> http://austingroupbugs.net/view.php?id=3D384 >> >=20 > This got rejected, or? Means that there is no willingness to introduce > this guarantee at POSIX level? > =20 That particular bug report was rejected because the POSIX folks decided that the C11 wording was clear enough that va_start() was already guaranteed to not mess with errno, so no additionally wording was needed in POSIX. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --xko3EfvuMrfXvFffWoKimW7gdejwGqsIp 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/ iQEcBAEBCAAGBQJXmnM8AAoJEKeha0olJ0NqJLwH/1YQwLuyPytGRtgbLw8BQKNS Qkq+tixP+lnpDm6mOVP6ngb010h5WhrJOgQfHGeVn04imRxp6Id06LaoL8fGo05b mFozrSJlqQETmW0Dw7rsgHUgfnKz4KwuRd0QSQoc2WCRrpg7famirlXcZI1USWOL PO0Nr0ZRAMXvXoRcUWNiuFyxEfk6lnu4X1wfMvukCC4WkzP4Nbt1f4BWOOnxm+/D PLLscJoiz7FgkysJy+Cmo0Naqcp35ycgDfIsrqklJ8HE1cWG3+CTrEOGFL4q+0uk eb/4FWeaZKyK8en1LJVlI+r3Lt2FCbUN2oQ0nsnNsJ4km/jxy9Au7WQW8oS26BY= =kAFw -----END PGP SIGNATURE----- --xko3EfvuMrfXvFffWoKimW7gdejwGqsIp--