From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 21 18:34:28 2012 Received: (at submit) by debbugs.gnu.org; 21 Mar 2012 22:34:28 +0000 Received: from localhost ([127.0.0.1]:60215 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SAU6Y-0004kf-NZ for submit@debbugs.gnu.org; Wed, 21 Mar 2012 18:34:28 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34439) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SATuB-0004Qh-PS for submit@debbugs.gnu.org; Wed, 21 Mar 2012 18:21:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SATQQ-0000xD-AG for submit@debbugs.gnu.org; Wed, 21 Mar 2012 17:50:35 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:58983) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SATQQ-0000x8-7X for submit@debbugs.gnu.org; Wed, 21 Mar 2012 17:50:34 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48115) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SATQO-00024z-Ds for bug-coreutils@gnu.org; Wed, 21 Mar 2012 17:50:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SATQM-0000wi-6F for bug-coreutils@gnu.org; Wed, 21 Mar 2012 17:50:31 -0400 Received: from fmmailgate05.web.de ([217.72.192.243]:58890) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SATQL-0000wH-9D for bug-coreutils@gnu.org; Wed, 21 Mar 2012 17:50:30 -0400 Received: from moweb001.kundenserver.de (moweb001.kundenserver.de [172.19.20.114]) by fmmailgate05.web.de (Postfix) with ESMTP id 316186BAB9DE for ; Wed, 21 Mar 2012 22:50:26 +0100 (CET) Received: from [192.168.1.215] ([78.48.33.52]) by smtp.web.de (mrweb002) with ESMTPA (Nemesis) id 0Mb8h9-1RqK8v0MjD-00KhT0; Wed, 21 Mar 2012 22:50:26 +0100 Message-ID: <4F6A4D1A.6090004@web.de> Date: Wed, 21 Mar 2012 22:50:18 +0100 From: Markus Elfring User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120312 Thunderbird/11.0 MIME-Version: 1.0 To: bug-coreutils@gnu.org Subject: Completion of error handling Content-Type: text/plain; charset=UTF-8; format=flowed X-Provags-ID: V02:K0:VrArCzqbriL8QsWLE25jy6E1zyGhcjcmvPMFe72weIA mgjv4k5aJejZlSEzPoqbF36jbYQMEOIBVQDaXz575PGTMAxpU8 o6ksu4YVYY5ay0WMcX21rNNag7E07Nt2x8mvZmY1ZmPAkrb/jY ao57iELljVJdPG6/+GeHGonZ5xzVhWDHU8Bq2u/R/ehvFIsjbU r5SASXrvMdQLH53t+Uthw== Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 21 Mar 2012 18:34:05 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Hello! I have looked at a few source files for your current software. I have=20 noticed that some checks for return codes are missing. Would you like to add more error handling for return values from=20 functions like the following? - atexit =E2=87=92 main =20 http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/date.c?id=3D3ba8b= 044267a5f7cfa8a7b0d7f19dab3f21431da#n320 - fputs =E2=87=92 print_numbers =20 http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/seq.c?id=3Dd3227e= eb90c8308abd1e6bf08ee253b7a4e78d1d#n238 - printf =E2=87=92 write_header =20 http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/head.c?id=3Dd7878= 454cd02518959b0d6036db3a5b6ff00ca57#n162 Regards, Markus From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 21 18:44:45 2012 Received: (at control) by debbugs.gnu.org; 21 Mar 2012 22:44:45 +0000 Received: from localhost ([127.0.0.1]:60224 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SAUGq-00050x-8n for submit@debbugs.gnu.org; Wed, 21 Mar 2012 18:44:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12600) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SAUGS-00050A-Fg; Wed, 21 Mar 2012 18:44:41 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2LMDZtu027920 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 21 Mar 2012 18:13:35 -0400 Received: from [10.3.113.134] (ovpn-113-134.phx2.redhat.com [10.3.113.134]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q2LMDY1c009590; Wed, 21 Mar 2012 18:13:35 -0400 Message-ID: <4F6A528E.20500@redhat.com> Date: Wed, 21 Mar 2012 16:13:34 -0600 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1 MIME-Version: 1.0 To: Markus Elfring Subject: Re: bug#11058: Completion of error handling References: <4F6A4D1A.6090004@web.de> In-Reply-To: <4F6A4D1A.6090004@web.de> X-Enigmail-Version: 1.4 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigDAD71685912355CDB00A3D9A" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: control Cc: 11058-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigDAD71685912355CDB00A3D9A Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable tag 11058 notabug thanks On 03/21/2012 03:50 PM, Markus Elfring wrote: > Hello! >=20 > I have looked at a few source files for your current software. I have > noticed that some checks for return codes are missing. Thanks for the report. >=20 > Would you like to add more error handling for return values from > functions like the following? > - atexit =E2=87=92 main >=20 > http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/date.c?id=3D3ba= 8b044267a5f7cfa8a7b0d7f19dab3f21431da#n320 Maybe worth cleaning up all atexit() calls, but unlikely to ever fail since POSIX guarantees at least 32 successful atexit calls and we are only making 1. I'm not losing any sleep if we don't change this. >=20 > - fputs =E2=87=92 print_numbers >=20 > http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/seq.c?id=3Dd322= 7eeb90c8308abd1e6bf08ee253b7a4e78d1d#n238 >=20 >=20 > - printf =E2=87=92 write_header >=20 > http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/head.c?id=3Dd78= 78454cd02518959b0d6036db3a5b6ff00ca57#n162 Intentional. We have chosen to instead install an atexit handler as well as use the gnulib module close-stream, which guarantees that we investigate ferror() for all closed FILE*, and deal with the errors in a central location rather than bloating the code to deal with errors after every single operation on a FILE*. Not worth your time to try to patch these. You can still submit patches, and we will still evaluate them on their individual merits, but I don't see this as fixing any actual bugs at the moment, so I'm marking this bug as closed. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigDAD71685912355CDB00A3D9A Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJPalKOAAoJEKeha0olJ0NqL6IH/jeRQc8qn8v1KhawaPDHtLL3 oMDR2DSkxAEkEYoNfmv7GkHNM40ly8u8n6jr+y4FNSHPlO5X4l9gA8mNW/h9rnlS qO9Rn5Zew2FpdnftEzq7Mav2NvFu2jfruyLkkJy/FrP1gxmtDWcbgQHYMPcCg2vA YRebnlQpj8HJSC1WHxqR0Cn8ic+NZLhkDrhhPPXaJnximcBCH6YJHXOgXfT6O5Cv PkVLTQYzeJH+/RZKMDkElDUS3K5aCtN1XKqwiwAlDdT0gKVEBxlIuugktGBKQBw/ KKF7MJ6hnpb3gcCsvUuyR2sY4rwCaOnGt51l2Wi8WJ0sBAYguBoB1KtlQ3U4M1A= =wqS1 -----END PGP SIGNATURE----- --------------enigDAD71685912355CDB00A3D9A-- From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 22 06:32:33 2012 Received: (at 11058-done) by debbugs.gnu.org; 22 Mar 2012 10:32:33 +0000 Received: from localhost ([127.0.0.1]:60626 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SAfJn-0001XF-Ia for submit@debbugs.gnu.org; Thu, 22 Mar 2012 06:32:32 -0400 Received: from fmmailgate04.web.de ([217.72.192.242]:56178) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SAfJS-0001Wl-Dr for 11058-done@debbugs.gnu.org; Thu, 22 Mar 2012 06:32:30 -0400 Received: from moweb001.kundenserver.de (moweb001.kundenserver.de [172.19.20.114]) by fmmailgate04.web.de (Postfix) with ESMTP id 1EA297427671 for <11058-done@debbugs.gnu.org>; Thu, 22 Mar 2012 11:01:23 +0100 (CET) Received: from [192.168.1.215] ([78.48.196.177]) by smtp.web.de (mrweb002) with ESMTPA (Nemesis) id 0McneT-1RtGXQ3RvV-00IECa; Thu, 22 Mar 2012 11:01:22 +0100 Message-ID: <4F6AF869.7010101@web.de> Date: Thu, 22 Mar 2012 11:01:13 +0100 From: Markus Elfring User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120312 Thunderbird/11.0 MIME-Version: 1.0 To: Eric Blake Subject: Re: bug#11058: Completion of error handling References: <4F6A4D1A.6090004@web.de> <4F6A528E.20500@redhat.com> In-Reply-To: <4F6A528E.20500@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:vnLO9AEfNKnBhrAfLjsG78YZdKYFWr93/k4ZGOjlSCv W8xZFiC1/+HCcdVyRNc8TesSXO/jGj8BYfBKwha7S1jOgunavl DzAfj+U4//+mulIXDGZH8qjJ19uf4CL/5LWGiA68BvFKqH7C3D 817n+jYQsRqlb9pK/X7rgu4t//KClWBgXVRDTwNEqpIK7AgcwM 492THm0FqJj729C5UzkHg== X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11058-done Cc: 11058-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > Intentional. We have chosen to instead install an atexit handler as > well as use the gnulib module close-stream, which guarantees that we > investigate ferror() for all closed FILE*, and deal with the errors in a > central location rather than bloating the code to deal with errors after > every single operation on a FILE*. How do the affected programs behave if the output target will be connected to a full device? I suggest to avoid unchecked function calls. Would you like to detect every error situation as early as possible? Would you like to reduce the efforts for error code checking by an exception class hierarchy? http://dietmar-kuehl.de/mirror/c++-faq/exceptions.html#faq-17.1 How do you think about to apply aspect-oriented software development? http://aspectc.org/ http://research.msrg.utoronto.ca/ACC/Tutorial#A_Reusable_Aspect_for_Memory_All Regards, Markus From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 22 07:29:24 2012 Received: (at 11058-done) by debbugs.gnu.org; 22 Mar 2012 11:29:24 +0000 Received: from localhost ([127.0.0.1]:60666 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SAgCo-0002tR-TO for submit@debbugs.gnu.org; Thu, 22 Mar 2012 07:29:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50474) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SAgCk-0002tG-8a for 11058-done@debbugs.gnu.org; Thu, 22 Mar 2012 07:29:21 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2MAwUOm008596 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 22 Mar 2012 06:58:30 -0400 Received: from [10.3.113.134] (ovpn-113-134.phx2.redhat.com [10.3.113.134]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q2MAwToo011673; Thu, 22 Mar 2012 06:58:29 -0400 Message-ID: <4F6B05D5.5040000@redhat.com> Date: Thu, 22 Mar 2012 04:58:29 -0600 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1 MIME-Version: 1.0 To: Markus Elfring Subject: Re: bug#11058: Completion of error handling References: <4F6A4D1A.6090004@web.de> <4F6A528E.20500@redhat.com> <4F6AF869.7010101@web.de> In-Reply-To: <4F6AF869.7010101@web.de> X-Enigmail-Version: 1.4 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigCD28E11AEAE975E9F9F8997D" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 11058-done Cc: 11058-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigCD28E11AEAE975E9F9F8997D Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/22/2012 04:01 AM, Markus Elfring wrote: >> Intentional. We have chosen to instead install an atexit handler as >> well as use the gnulib module close-stream, which guarantees that we >> investigate ferror() for all closed FILE*, and deal with the errors in= a >> central location rather than bloating the code to deal with errors aft= er >> every single operation on a FILE*. >=20 > How do the affected programs behave if the output target will be > connected to a full device? The program reports the error and exits with non-zero status. And 'make check' ensures this. See, for example, tests/misc/help-version, which explicitly calls 'program --help >/dev/full' to check that the write errors are detected, even though we intentionally didn't bother to check each fprintf or fputs during usage(), but instead only check at the point of fclose. >=20 > I suggest to avoid unchecked function calls. We agree on that principle, but our practice of that is done by checking at the fclose rather than cluttering the rest of the code with redundant checks. > Would you like to detect every error situation as early as possible? Not if it is a maintenance nightmare. >=20 > Would you like to reduce the efforts for error code checking by an > exception class hierarchy? > http://dietmar-kuehl.de/mirror/c++-faq/exceptions.html#faq-17.1 >=20 > How do you think about to apply aspect-oriented software development? > http://aspectc.org/ > http://research.msrg.utoronto.ca/ACC/Tutorial#A_Reusable_Aspect_for_Mem= ory_All You're welcome to submit patches, and we will evaluate them on their merits, if you think the current code base is wrong. But I'm perfectly happy with our current coding style. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigCD28E11AEAE975E9F9F8997D Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJPawXVAAoJEKeha0olJ0NqJ0AIAJE/iRIXwH2ojiOINWesxpEH UyuEUsTp/8zcLDLmlQFeWumhxCSipucYOAqtl8LtbC/3GsXmL+JFtq7SQuvoRpY2 YewyxDNVNNTIFwGibWT3bZNHlfnpQesnZW0cT5HpAHX6zi8jxBJOj+7v/81MbDvG yBgcUMQvYqaoJZ0SozOA3n/y94uYu8F0N5tg3UxTnqSkW48+We2oEAEq0M8o4HLt axEWJF2P18xY9/S3uKVtO4I95Y1Arh6G/dsGEHPImr4AA93JBbHJKfHS7vyFOEi6 FaBNzXH0M4Be7FPB7VjtgQgwqAA38OPRd4Zh9y13DNPX84U9+VH6axms2fzd6Ok= =sMnv -----END PGP SIGNATURE----- --------------enigCD28E11AEAE975E9F9F8997D-- From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 22 07:46:20 2012 Received: (at 11058-done) by debbugs.gnu.org; 22 Mar 2012 11:46:20 +0000 Received: from localhost ([127.0.0.1]:60672 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SAgTC-00045W-Vw for submit@debbugs.gnu.org; Thu, 22 Mar 2012 07:46:19 -0400 Received: from fmmailgate06.web.de ([217.72.192.247]:63146) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SAgSr-00044m-KE for 11058-done@debbugs.gnu.org; Thu, 22 Mar 2012 07:46:17 -0400 Received: from moweb002.kundenserver.de (moweb002.kundenserver.de [172.19.20.108]) by fmmailgate06.web.de (Postfix) with ESMTP id C25ACFF9902 for <11058-done@debbugs.gnu.org>; Thu, 22 Mar 2012 12:13:56 +0100 (CET) Received: from [192.168.1.215] ([78.48.196.177]) by smtp.web.de (mrweb001) with ESMTPA (Nemesis) id 0LZeou-1Sa8sa0pK8-00lKYO; Thu, 22 Mar 2012 12:13:56 +0100 Message-ID: <4F6B0971.7050608@web.de> Date: Thu, 22 Mar 2012 12:13:53 +0100 From: Markus Elfring User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120312 Thunderbird/11.0 MIME-Version: 1.0 To: Eric Blake Subject: Re: bug#11058: Completion of error handling References: <4F6A4D1A.6090004@web.de> <4F6A528E.20500@redhat.com> <4F6AF869.7010101@web.de> <4F6B05D5.5040000@redhat.com> In-Reply-To: <4F6B05D5.5040000@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:pcgTMHGgmD3XXZhG7KGVGwwc6Fclv4EDUE/r85yABkk 8N6jcjhCH7Tpw05M9YCwfFy7+9zdl/1yOAwrvQVNFj4BcvSLH6 KtjMNf5d2S9RYis1l3ip+aESiQhg0q7GItbacZeN0pPwh9N2FM 2OrHJVQEWzn7NTbRlmCc0sHegOhtiRbo4CGTZRNgM/vBl27vq6 9ZjiX3k3nzE2PLemU/vWw== X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11058-done Cc: 11058-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > We agree on that principle, but our practice of that is done > by checking at the fclose rather than cluttering the rest of the code > with redundant checks. Thanks for your clarification. > Not if it is a maintenance nightmare. How do you think about to ecapsulate error detection as reusable aspects? > You're welcome to submit patches, and we will evaluate them on their > merits, if you think the current code base is wrong. How are the chances to cooperate with a tool like "AspectC++"? Regards, Markus From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 22 07:49:10 2012 Received: (at 11058-done) by debbugs.gnu.org; 22 Mar 2012 11:49:10 +0000 Received: from localhost ([127.0.0.1]:60675 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SAgVx-00049i-Fz for submit@debbugs.gnu.org; Thu, 22 Mar 2012 07:49:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4258) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SAgVt-00049Y-Ir for 11058-done@debbugs.gnu.org; Thu, 22 Mar 2012 07:49:08 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2MBIH0d008105 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 22 Mar 2012 07:18:17 -0400 Received: from [10.3.113.134] (ovpn-113-134.phx2.redhat.com [10.3.113.134]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q2MBIHnS032148; Thu, 22 Mar 2012 07:18:17 -0400 Message-ID: <4F6B0A78.7020004@redhat.com> Date: Thu, 22 Mar 2012 05:18:16 -0600 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1 MIME-Version: 1.0 To: Markus Elfring Subject: Re: bug#11058: Completion of error handling References: <4F6A4D1A.6090004@web.de> <4F6A528E.20500@redhat.com> <4F6AF869.7010101@web.de> <4F6B05D5.5040000@redhat.com> <4F6B0971.7050608@web.de> In-Reply-To: <4F6B0971.7050608@web.de> X-Enigmail-Version: 1.4 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig350C4484244A347AC041A152" X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 11058-done Cc: 11058-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig350C4484244A347AC041A152 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/22/2012 05:13 AM, Markus Elfring wrote: >> Not if it is a maintenance nightmare. >=20 > How do you think about to ecapsulate error detection as reusable aspect= s? Submit a patch, and we'll evaluate it. >> You're welcome to submit patches, and we will evaluate them on their >> merits, if you think the current code base is wrong. >=20 > How are the chances to cooperate with a tool like "AspectC++"? Coreutils is written in C, not C++, so I'm not sure how a tool like AspectC++ would be usable. But without knowing the tool, and without a patch showing how the tool might be useful, I can't offer any further opinion. The current code base doesn't bother me, so the burden is now on you to demonstrate that refactoring the code base to work with a new tool has a payoff of easier maintenance (that is, that such a tool could avoid errors by making auditing easier, provided we abide by the guidelines expected by such a tool). --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig350C4484244A347AC041A152 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJPawp4AAoJEKeha0olJ0Nqzb0IAK5x78Bpo6NnQXj9lqYZ44zB JyKLxwwzgqBoHcOoH0fR7gKluvIQeZOUNzajI0xUUHNSTpht78QancO7lqOUK+60 AgvdqL2hkt5N7lAdTYI+APmXigcbBxRL2fEVFiSgE+tbRVqQtrjdWVyZ2IgOMj6E yZ9acrKRQbYznCh3LUC5gvusvS+7oJNA6wcTffy35/ztRdrLMrSgoE6xT2wsgW+T Z2QtsiiomKzdyIsIvI/HGDW5HXLIHwBBVATGdOpHW1nAgLOQFy8RCk9HxqTeJTqJ 2IP4TOY3TnAKhk5UbvNvRB4uYmoJVIccJAIDyJouRQmcEheCyuJGn49qlfAYIYc= =uufp -----END PGP SIGNATURE----- --------------enig350C4484244A347AC041A152-- From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 22 09:01:45 2012 Received: (at 11058-done) by debbugs.gnu.org; 22 Mar 2012 13:01:45 +0000 Received: from localhost ([127.0.0.1]:60755 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SAheC-0005sj-7D for submit@debbugs.gnu.org; Thu, 22 Mar 2012 09:01:45 -0400 Received: from fmmailgate06.web.de ([217.72.192.247]:61509) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SAhdr-0005sH-1H for 11058-done@debbugs.gnu.org; Thu, 22 Mar 2012 09:01:43 -0400 Received: from moweb002.kundenserver.de (moweb002.kundenserver.de [172.19.20.108]) by fmmailgate06.web.de (Postfix) with ESMTP id EE7ED1004E4C for <11058-done@debbugs.gnu.org>; Thu, 22 Mar 2012 13:30:34 +0100 (CET) Received: from [192.168.1.215] ([78.48.196.177]) by smtp.web.de (mrweb001) with ESMTPA (Nemesis) id 0MX0lw-1Rpt1B3bzo-00WA9c; Thu, 22 Mar 2012 13:30:34 +0100 Message-ID: <4F6B1B67.4020902@web.de> Date: Thu, 22 Mar 2012 13:30:31 +0100 From: Markus Elfring User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120312 Thunderbird/11.0 MIME-Version: 1.0 To: Eric Blake Subject: Re: bug#11058: Completion of error handling References: <4F6A4D1A.6090004@web.de> <4F6A528E.20500@redhat.com> <4F6AF869.7010101@web.de> <4F6B05D5.5040000@redhat.com> <4F6B0971.7050608@web.de> <4F6B0A78.7020004@redhat.com> In-Reply-To: <4F6B0A78.7020004@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:RZr/VYATn6elj/neegINC2800kd8JpSxZQaQSAIq8+1 n4qt5PQ9Rn1etucjAfzUP7pGONcC4aaJUz4lihOacbEnNZbiq0 e99V2o4wF9tEWSczUaOWY6L6sRSM00aC6gFCWXzM/QuRUA+8TV rugs5rZjmRCdVcILRspCnZWP7Glsex2NE/zu1TrhbMp8/6Z+yK bO9yXSCDwYNPx7Zan0sEA== X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11058-done Cc: 11058-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > Submit a patch, and we'll evaluate it. I hope that the involved technical details can be clarified before the potential review of a concrete patch. > Coreutils is written in C, not C++, so I'm not sure how a tool like > AspectC++ would be usable. Aspects are another evolving means to structure some source code. > But without knowing the tool, and without a patch showing how the tool > might be useful, I can't offer any further opinion. I guess that you will be able to decide on related software design decisions. It is a matter if the introduction of a dependency on a dedicated tool will become generally acceptable. > The current code base doesn't bother me, so the burden is now on you > to demonstrate that refactoring the code base to work with a new tool > has a payoff of easier maintenance (that is, that such a tool could > avoid errors by making auditing easier, provided we abide by the guidelines > expected by such a tool). Other software developers and computer scientists have already demonstrated the usefulness of aspect-oriented software development. http://research.msrg.utoronto.ca/ACC/Tutorial http://aspectc.org/Publications.6.0.html http://aosd.net/ I would like to find out if corresponding techniques will also become applicable for your source files. Regards, Markus From unknown Fri Aug 22 01:03:46 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 20 Apr 2012 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator