From unknown Sun Jun 22 11:31:00 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#5958 <5958@debbugs.gnu.org> To: bug#5958 <5958@debbugs.gnu.org> Subject: Status: Sort-8.4 bug Reply-To: bug#5958 <5958@debbugs.gnu.org> Date: Sun, 22 Jun 2025 18:31:00 +0000 retitle 5958 Sort-8.4 bug reassign 5958 coreutils submitter 5958 srodri@datsi.fi.upm.es severity 5958 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 16 08:13:41 2010 Received: (at submit) by debbugs.gnu.org; 16 Apr 2010 12:13:41 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O2kQW-0007Fm-B0 for submit@debbugs.gnu.org; Fri, 16 Apr 2010 08:13:41 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O2jGN-000694-5U for submit@debbugs.gnu.org; Fri, 16 Apr 2010 06:59:07 -0400 Received: from lists.gnu.org ([199.232.76.165]:53516) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1O2jGI-0004EB-4A for submit@debbugs.gnu.org; Fri, 16 Apr 2010 06:59:02 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O2jGH-0003NY-A0 for bug-coreutils@gnu.org; Fri, 16 Apr 2010 06:59:01 -0400 Received: from [140.186.70.92] (port=55968 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O2jGF-0003M4-Dn for bug-coreutils@gnu.org; Fri, 16 Apr 2010 06:59:00 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DEAR_SOMETHING, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.0 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O2jGD-0003RN-UR for bug-coreutils@gnu.org; Fri, 16 Apr 2010 06:58:59 -0400 Received: from relay.fi.upm.es ([138.100.8.77]:57087 helo=relay4.fi.upm.es) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O2jGD-0003RE-NN for bug-coreutils@gnu.org; Fri, 16 Apr 2010 06:58:57 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by relay4.fi.upm.es (Postfix) with ESMTP id D308E3049C for ; Fri, 16 Apr 2010 12:58:56 +0200 (CEST) X-Virus-Scanned: by amavisd-new using ClamAV at efiltro.fi.upm.es Received: from haya.datsi.fi.upm.es (haya.datsi.fi.upm.es [138.100.9.188]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by relay4.fi.upm.es (Postfix) with ESMTP id BFF96303D9 for ; Fri, 16 Apr 2010 12:58:56 +0200 (CEST) Received: from [138.100.9.33] (tajinaste.datsi.fi.upm.es [138.100.9.33]) by haya.datsi.fi.upm.es (Postfix-TLS) with ESMTPS id 1C6BA64CB for ; Fri, 16 Apr 2010 12:58:56 +0200 (CEST) Message-ID: <4BC842EF.1000901@fi.upm.es> Date: Fri, 16 Apr 2010 12:58:55 +0200 From: Santiago Rodriguez Organization: Facultad de Informatica User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: bug-coreutils@gnu.org Subject: Sort-8.4 bug Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 16 Apr 2010 08:13:37 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: srodri@datsi.fi.upm.es 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: -4.3 (----) Dear sirs, I think I have found a bug in sort coreutils command. When I type sort -T /tmp +1 -2 +2rn -3 +0 -1<) id 1O2mHR-00087a-7d for submit@debbugs.gnu.org; Fri, 16 Apr 2010 10:12:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O2mHN-00087T-Q8 for 5958@debbugs.gnu.org; Fri, 16 Apr 2010 10:12:23 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o3GECFNo006451 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 16 Apr 2010 10:12:15 -0400 Received: from [10.11.8.194] (vpn-8-194.rdu.redhat.com [10.11.8.194]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o3GECEsX010149; Fri, 16 Apr 2010 10:12:14 -0400 Message-ID: <4BC87044.9050206@redhat.com> Date: Fri, 16 Apr 2010 08:12:20 -0600 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b1 Thunderbird/3.0.4 MIME-Version: 1.0 To: Santiago Rodriguez Subject: Re: bug#5958: Sort-8.4 bug References: <4BC842EF.1000901@fi.upm.es> In-Reply-To: <4BC842EF.1000901@fi.upm.es> X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig1DF8728B499BE3B3E434330A" X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-Spam-Score: -8.3 (--------) X-Debbugs-Envelope-To: 5958 Cc: 5958@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -9.4 (---------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig1DF8728B499BE3B3E434330A Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 04/16/2010 04:58 AM, Santiago Rodriguez wrote: > Dear sirs, >=20 > I think I have found a bug in sort coreutils command. When I type >=20 > sort -T /tmp +1 -2 +2rn -3 +0 -1< perra/S perra 2.200000 > perro/PS perra 4.400000 > EOF Thanks for the report; however, this is not a bug. The syntax 'sort +1' is obsolete. You are better off rewriting your scripts to conform to POSIX: sort -T /tmp -k2,3 -k3,4rn -k1,2 And in doing so, you've just made it apparent why sort behaved correctly, but differently than you expected. Basically, you have requested that your first sort key be the combination of the second and third field. And since 'perra 2.200000' sorts before 'perra 4.400000', there is no need for sort to fall back on the second and third key specifications. You can get the desired results with: sort -T /tmp -k2,2 -k3,3rn -k1,1 or the obsolete: sort -T /tmp +1 -1 +2rn -2 +0 -0 Meanwhile, we have a patch brewing (but not in 8.4) that allows sort to output some debug hints, to actually show which portions of each line were used in the various comparisons. I'm hoping we can get that patch polished soon, because it would have been very helpful in demonstrating my reply. >=20 > The result is the same. If I make the same executions with sort 5.0 it > works properly. Actually, sort 5.0 was buggy in this area. Sort 8.4 has a number of bug fixes for bad behavior in sort 5.0. --=20 Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enig1DF8728B499BE3B3E434330A 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.10 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iEYEARECAAYFAkvIcEYACgkQ84KuGfSFAYDiwACfSmcMj0Mf4r0nsAzTpLYbc4dT JqgAn3+IFB85EdyMa2zjR4Jba5u6Y78r =EhM0 -----END PGP SIGNATURE----- --------------enig1DF8728B499BE3B3E434330A-- From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 16 20:10:01 2010 Received: (at 5958) by debbugs.gnu.org; 17 Apr 2010 00:10:02 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O2vbk-0004oC-TV for submit@debbugs.gnu.org; Fri, 16 Apr 2010 20:10:01 -0400 Received: from c-98-226-122-10.hsd1.in.comcast.net ([98.226.122.10] helo=kosh.dhis.org) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1O2val-0004nU-NL for 5958@debbugs.gnu.org; Fri, 16 Apr 2010 20:09:00 -0400 Received: (qmail 15278 invoked by uid 1000); 17 Apr 2010 00:08:55 -0000 Message-ID: <20100417000855.15277.qmail@kosh.dhis.org> From: pacman@kosh.dhis.org Subject: Re: bug#5958: Sort-8.4 bug To: eblake@redhat.com (Eric Blake) Date: Fri, 16 Apr 2010 19:08:55 -0500 (GMT+5) In-Reply-To: <4BC87044.9050206@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Score: 3.5 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eric Blake writes: > > On 04/16/2010 04:58 AM, Santiago Rodriguez wrote: > > Dear sirs, > >=20 > > I think I have found a bug in sort coreutils command. When I type > >=20 > > sort -T /tmp +1 -2 +2rn -3 +0 -1< > perra/S perra 2.200000 > > perro/PS perra 4.400000 > > EOF > > Thanks for the report; however, this is not a bug. > > The syntax 'sort +1' is obsolete. You are better off rewriting your [...] Content analysis details: (3.5 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.9 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL [98.226.122.10 listed in zen.spamhaus.org] 0.9 RCVD_IN_SORBS_DUL RBL: SORBS: sent directly from dynamic IP address [98.226.122.10 listed in dnsbl.sorbs.net] 1.6 DEAR_SOMETHING BODY: Contains 'Dear (something)' 0.0 BAYES_50 BODY: Bayesian spam probability is 40 to 60% [score: 0.5000] 0.1 RDNS_DYNAMIC Delivered to trusted network by host with dynamic-looking rDNS X-Debbugs-Envelope-To: 5958 X-Mailman-Approved-At: Fri, 16 Apr 2010 20:10:00 -0400 Cc: Santiago Rodriguez , 5958@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: 3.5 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eric Blake writes: > > On 04/16/2010 04:58 AM, Santiago Rodriguez wrote: > > Dear sirs, > >=20 > > I think I have found a bug in sort coreutils command. When I type > >=20 > > sort -T /tmp +1 -2 +2rn -3 +0 -1< > perra/S perra 2.200000 > > perro/PS perra 4.400000 > > EOF > > Thanks for the report; however, this is not a bug. > > The syntax 'sort +1' is obsolete. You are better off rewriting your [...] Content analysis details: (3.5 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.9 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL [98.226.122.10 listed in zen.spamhaus.org] 0.9 RCVD_IN_SORBS_DUL RBL: SORBS: sent directly from dynamic IP address [98.226.122.10 listed in dnsbl.sorbs.net] 1.6 DEAR_SOMETHING BODY: Contains 'Dear (something)' 0.0 BAYES_50 BODY: Bayesian spam probability is 40 to 60% [score: 0.5000] 0.1 RDNS_DYNAMIC Delivered to trusted network by host with dynamic-looking rDNS Eric Blake writes: > > On 04/16/2010 04:58 AM, Santiago Rodriguez wrote: > > Dear sirs, > >=20 > > I think I have found a bug in sort coreutils command. When I type > >=20 > > sort -T /tmp +1 -2 +2rn -3 +0 -1< > perra/S perra 2.200000 > > perro/PS perra 4.400000 > > EOF > > Thanks for the report; however, this is not a bug. > > The syntax 'sort +1' is obsolete. You are better off rewriting your When you pry it from my cold dead hands... > scripts to conform to POSIX: > > sort -T /tmp -k2,3 -k3,4rn -k1,2 I don't think that's a correct equivalence. Traditional options +1 -2 should mean the same as -k2,2 (i.e. the -2 means the key ends *before* field 2, counting from 0). Instead of comparing new coreutils to old coreutils, how about reading some documentation that actually specifies the +pos1 -pos2 syntax, and is not written from the "why won't those old people die off already" point of view? For example the V7 man page: http://www.freebsd.org/cgi/man.cgi?query=sort&apropos=0&sektion=0&manpath=Unix+Seventh+Edition&format=ascii Or something more recent, from Solaris, that provides a precise formula for translating +pos1 -pos2 into -k options: http://www.freebsd.org/cgi/man.cgi?query=sort&apropos=0&sektion=0&manpath=SunOS+5.10&format=ascii -- Alan Curry From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 18 04:47:26 2010 Received: (at 5958-done) by debbugs.gnu.org; 18 Apr 2010 08:47:26 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3QA2-0001lV-FE for submit@debbugs.gnu.org; Sun, 18 Apr 2010 04:47:26 -0400 Received: from smtp6-g21.free.fr ([212.27.42.6]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3Q9z-0001lQ-HV for 5958-done@debbugs.gnu.org; Sun, 18 Apr 2010 04:47:25 -0400 Received: from smtp6-g21.free.fr (localhost [127.0.0.1]) by smtp6-g21.free.fr (Postfix) with ESMTP id DD803E08089; Sun, 18 Apr 2010 10:47:16 +0200 (CEST) Received: from mx.meyering.net (mx.meyering.net [82.230.74.64]) by smtp6-g21.free.fr (Postfix) with ESMTP id D5662E080D2; Sun, 18 Apr 2010 10:47:13 +0200 (CEST) Received: by rho.meyering.net (Acme Bit-Twister, from userid 1000) id 6355899C; Sun, 18 Apr 2010 10:47:13 +0200 (CEST) From: Jim Meyering To: pacman@kosh.dhis.org Subject: Re: bug#5958: Sort-8.4 bug In-Reply-To: <20100417000855.15277.qmail@kosh.dhis.org> (pacman@kosh.dhis.org's message of "Fri, 16 Apr 2010 19:08:55 -0500 (GMT+5)") References: <4BC842EF.1000901@fi.upm.es> <20100417000855.15277.qmail@kosh.dhis.org> Date: Sun, 18 Apr 2010 10:47:13 +0200 Message-ID: <87aat1i1v2.fsf@meyering.net> Lines: 18 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 5958-done Cc: Santiago Rodriguez , 5958-done@debbugs.gnu.org, Eric Blake X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -3.1 (---) pacman@kosh.dhis.org wrote: > Eric Blake writes: >> On 04/16/2010 04:58 AM, Santiago Rodriguez wrote: >> > I think I have found a bug in sort coreutils command. When I type >> > >> > sort -T /tmp +1 -2 +2rn -3 +0 -1<> > perra/S perra 2.200000 >> > perro/PS perra 4.400000 >> > EOF >> >> Thanks for the report; however, this is not a bug. >> >> The syntax 'sort +1' is obsolete. You are better off rewriting your > > When you pry it from my cold dead hands... It has been declared "obsolete" for a good reason: it is ambiguous. If you require that syntax, use some other sort program. From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 18 09:08:58 2010 Received: (at 5958-done) by debbugs.gnu.org; 18 Apr 2010 13:08:58 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3UF7-000417-Ie for submit@debbugs.gnu.org; Sun, 18 Apr 2010 09:08:58 -0400 Received: from c-98-226-122-10.hsd1.in.comcast.net ([98.226.122.10] helo=kosh.dhis.org) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1O3QMw-0001rD-8e for 5958-done@debbugs.gnu.org; Sun, 18 Apr 2010 05:00:46 -0400 Received: (qmail 8453 invoked by uid 1000); 18 Apr 2010 09:00:43 -0000 Message-ID: <20100418090043.8452.qmail@kosh.dhis.org> From: pacman@kosh.dhis.org Subject: Re: bug#5958: Sort-8.4 bug To: jim@meyering.net (Jim Meyering) Date: Sun, 18 Apr 2010 04:00:43 -0500 (GMT+5) In-Reply-To: <87aat1i1v2.fsf@meyering.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Score: 2.7 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Jim Meyering writes: > > pacman@kosh.dhis.org wrote: > > Eric Blake writes: > >> The syntax 'sort +1' is obsolete. You are better off rewriting your > > > > When you pry it from my cold dead hands... > > It has been declared "obsolete" for a good reason: it is ambiguous. > If you require that syntax, use some other sort program. > [...] Content analysis details: (2.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.9 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL [98.226.122.10 listed in zen.spamhaus.org] 0.9 RCVD_IN_SORBS_DUL RBL: SORBS: sent directly from dynamic IP address [98.226.122.10 listed in dnsbl.sorbs.net] 0.0 BAYES_50 BODY: Bayesian spam probability is 40 to 60% [score: 0.4893] 0.1 RDNS_DYNAMIC Delivered to trusted network by host with dynamic-looking rDNS 0.8 AWL AWL: From: address is in the auto white-list X-Debbugs-Envelope-To: 5958-done X-Mailman-Approved-At: Sun, 18 Apr 2010 09:08:55 -0400 Cc: Santiago Rodriguez , 5958-done@debbugs.gnu.org, pacman@kosh.dhis.org, Eric Blake X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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.1 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Jim Meyering writes: > > pacman@kosh.dhis.org wrote: > > Eric Blake writes: > >> The syntax 'sort +1' is obsolete. You are better off rewriting your > > > > When you pry it from my cold dead hands... > > It has been declared "obsolete" for a good reason: it is ambiguous. > If you require that syntax, use some other sort program. > [...] Content analysis details: (1.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.9 RCVD_IN_SORBS_DUL RBL: SORBS: sent directly from dynamic IP address [98.226.122.10 listed in dnsbl.sorbs.net] 0.9 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL [98.226.122.10 listed in zen.spamhaus.org] -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] 0.1 RDNS_DYNAMIC Delivered to trusted network by host with dynamic-looking rDNS 1.8 AWL AWL: From: address is in the auto white-list Jim Meyering writes: > > pacman@kosh.dhis.org wrote: > > Eric Blake writes: > >> The syntax 'sort +1' is obsolete. You are better off rewriting your > > > > When you pry it from my cold dead hands... > > It has been declared "obsolete" for a good reason: it is ambiguous. > If you require that syntax, use some other sort program. > What a crock. POSIX abdicated its responsibility to fully document the sort command. This makes the traditional documentation (i.e. the V7 man page) the most authoritative specification for what "sort +1 -2" means. If you won't make GNU sort behave correctly, it is time to remove it from general distribution and let people go find a working sort command elsewhere. From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 19 17:31:07 2010 Received: (at 5958-done) by debbugs.gnu.org; 19 Apr 2010 21:31:07 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3yYc-0005hO-LR for submit@debbugs.gnu.org; Mon, 19 Apr 2010 17:31:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3yYa-0005h1-9D for 5958-done@debbugs.gnu.org; Mon, 19 Apr 2010 17:31:05 -0400 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o3JLUw0B031543 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 19 Apr 2010 17:30:58 -0400 Received: from [10.3.252.118] (vpn-252-118.phx2.redhat.com [10.3.252.118]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o3JLUunO005743; Mon, 19 Apr 2010 17:30:57 -0400 Message-ID: <4BCCCB8F.4010802@redhat.com> Date: Mon, 19 Apr 2010 15:30:55 -0600 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b1 Thunderbird/3.0.4 MIME-Version: 1.0 To: pacman@kosh.dhis.org Subject: Re: bug#5958: Sort-8.4 bug References: <20100418090043.8452.qmail@kosh.dhis.org> In-Reply-To: <20100418090043.8452.qmail@kosh.dhis.org> X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigFBB781134713131F93A782B5" X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 X-Spam-Score: -8.9 (--------) X-Debbugs-Envelope-To: 5958-done Cc: Santiago Rodriguez , 5958-done@debbugs.gnu.org, Jim Meyering X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -10.2 (----------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigFBB781134713131F93A782B5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 04/18/2010 03:00 AM, pacman@kosh.dhis.org wrote: > Jim Meyering writes: >> >> pacman@kosh.dhis.org wrote: >>> Eric Blake writes: >>>> The syntax 'sort +1' is obsolete. You are better off rewriting your= >>> > POSIX abdicated its responsibility to fully document the sort command. No, sort +1 was properly documented in POSIX 1992; unfortunately, that old version of POSIX is not available online, and I don't have handy access to a hardcopy or pdf version. It was POSIX 2001 that withdrew documentation for sort +1 as part of deprecating the syntax as obsolete, while still allowing implementations to support it as a non-POSIX extensi= on. > This > makes the traditional documentation (i.e. the V7 man page) the most > authoritative specification for what "sort +1 -2" means. I agree that the coreutils documentation (info sort) could do a better job of documenting the translation from the obsolete syntax to the current syntax. If it weren't for copyright questions, I would even agree that blind copy-and-paste from the link you gave: http://www.freebsd.org/cgi/man.cgi?query=3Dsort&apropos=3D0&sektion=3D0&m= anpath=3DSunOS+5.10&format=3Dascii would make sense. But to be on the safe side, the best approach would be to write the rules by scratch, referring to the coreutils implementation and nothing external. Would you care to submit the patch?= > If you won't make > GNU sort behave correctly, it is time to remove it from general distrib= ution > and let people go find a working sort command elsewhere. First, you have to prove that sort is not behaving according to a particular standards document. And since POSIX 1992 _did_ document 'sort +1', that means quoting a relevant portion of that document along with a simple test case demonstrating why you think coreutils does not comply with that document. If you can prove that, then we will gladly fix the bug. --=20 Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enigFBB781134713131F93A782B5 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.10 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJLzMuWAAoJEKeha0olJ0Nqd8QH/R9f1bbuswjZZuZlDYDXgh+I wQCdCoLW+osojbfWrPsQFJyZ6D4hKUzSdgVwmPcZ9HT/Me1BL/AMkX8E+nrXVUSr EBFkdjK3nH3dfGo4PuhgTM/OeiCo3LT/XhaflBdi7ZDU0tquTCme1LORN1r3f+UA A3EfT3w+V5BESb5s+ynaizcdyp1Fz2iKRxedWGGmnOVtVI0M3A9N1QRIff3R5GmH MCP7q0V7i2eHPKHudjQMquyrL7yzJ24eLPAtpR7zrsoWcMwBKkuAxheDcQ68lULK BePL1vEjtQVqZUy5So3PciLfDlDIa4EOYjXARuJrHHfgWX71NCjY0R8u1nwVLb8= =d7nQ -----END PGP SIGNATURE----- --------------enigFBB781134713131F93A782B5-- From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 19 17:54:30 2010 Received: (at 5958-done) by debbugs.gnu.org; 19 Apr 2010 21:54:30 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3yvF-0005qt-Ry for submit@debbugs.gnu.org; Mon, 19 Apr 2010 17:54:30 -0400 Received: from c-98-226-122-10.hsd1.in.comcast.net ([98.226.122.10] helo=kosh.dhis.org) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1O3ys5-0005pN-A8 for 5958-done@debbugs.gnu.org; Mon, 19 Apr 2010 17:51:13 -0400 Received: (qmail 20040 invoked by uid 1000); 19 Apr 2010 21:51:08 -0000 Message-ID: <20100419215108.20039.qmail@kosh.dhis.org> From: pacman@kosh.dhis.org Subject: Re: bug#5958: Sort-8.4 bug To: eblake@redhat.com (Eric Blake) Date: Mon, 19 Apr 2010 16:51:08 -0500 (GMT+5) In-Reply-To: <4BCCCB8F.4010802@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eric Blake writes: > > First, you have to prove that sort is not behaving according to a > particular standards document. And since POSIX 1992 _did_ document > 'sort +1', that means quoting a relevant portion of that document along > with a simple test case demonstrating why you think coreutils does not > comply with that document. If you can prove that, then we will gladly > fix the bug. [...] Content analysis details: (2.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.9 RCVD_IN_SORBS_DUL RBL: SORBS: sent directly from dynamic IP address [98.226.122.10 listed in dnsbl.sorbs.net] 0.9 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL [98.226.122.10 listed in zen.spamhaus.org] 0.0 BAYES_50 BODY: Bayesian spam probability is 40 to 60% [score: 0.5000] 0.1 RDNS_DYNAMIC Delivered to trusted network by host with dynamic-looking rDNS 0.1 AWL AWL: From: address is in the auto white-list X-Debbugs-Envelope-To: 5958-done X-Mailman-Approved-At: Mon, 19 Apr 2010 17:54:27 -0400 Cc: Santiago Rodriguez , 5958-done@debbugs.gnu.org, pacman@kosh.dhis.org, Jim Meyering X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: 0.6 (/) Eric Blake writes: > > First, you have to prove that sort is not behaving according to a > particular standards document. And since POSIX 1992 _did_ document > 'sort +1', that means quoting a relevant portion of that document along > with a simple test case demonstrating why you think coreutils does not > comply with that document. If you can prove that, then we will gladly > fix the bug. So your plan is to ignore the many easily available documents that explain exactly what sort +1 -2 means, in favor of a document that you don't have, and then blow off bug reports by sending people on a wild goose chase. Please just take a current BSD or Solaris man page as definitive. Compatibility with other actually-existing implementations is what matters here, not some former standard. -- Alan Curry From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 19 18:06:25 2010 Received: (at 5958-done) by debbugs.gnu.org; 19 Apr 2010 22:06:25 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3z6n-0005wA-7K for submit@debbugs.gnu.org; Mon, 19 Apr 2010 18:06:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3z6k-0005w3-Ce for 5958-done@debbugs.gnu.org; Mon, 19 Apr 2010 18:06:23 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o3JM6GCa006942 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 19 Apr 2010 18:06:16 -0400 Received: from [10.3.252.118] (vpn-252-118.phx2.redhat.com [10.3.252.118]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o3JM6Ep6009846; Mon, 19 Apr 2010 18:06:15 -0400 Message-ID: <4BCCD3DC.4010507@redhat.com> Date: Mon, 19 Apr 2010 16:06:20 -0600 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b1 Thunderbird/3.0.4 MIME-Version: 1.0 To: pacman@kosh.dhis.org Subject: Re: bug#5958: Sort-8.4 bug References: <20100419215108.20039.qmail@kosh.dhis.org> In-Reply-To: <20100419215108.20039.qmail@kosh.dhis.org> X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig532664B0EB7F67209CC6690D" X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 X-Spam-Score: -10.2 (----------) X-Debbugs-Envelope-To: 5958-done Cc: Santiago Rodriguez , 5958-done@debbugs.gnu.org, Jim Meyering X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -10.2 (----------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig532664B0EB7F67209CC6690D Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 04/19/2010 03:51 PM, pacman@kosh.dhis.org wrote: > Eric Blake writes: >> >> First, you have to prove that sort is not behaving according to a >> particular standards document. And since POSIX 1992 _did_ document >> 'sort +1', that means quoting a relevant portion of that document alon= g >> with a simple test case demonstrating why you think coreutils does not= >> comply with that document. If you can prove that, then we will gladly= >> fix the bug. >=20 > So your plan is to ignore the many easily available documents that expl= ain > exactly what sort +1 -2 means, in favor of a document that you don't ha= ve, > and then blow off bug reports by sending people on a wild goose chase. I am not blowing off this bug report - I agree with you that we need better documentation. However, I don't have the resources to do all the legwork myself (in particular, access to the POSIX 1992 standard would be a big help), so in open source fashion, I'm asking for help. And since it seems to be your itch, the best you can do is scratch it by providing that help, rather than criticizing the fact that we are trying to spread the work load. >=20 > Please just take a current BSD or Solaris man page as definitive. It may be definitive for Solaris, but it is not definitive for POSIX, and it does not good to copy someone else's documentation if the implementation is subtly different. That's why I'm insisting that we go to the sources - somewhere where the behavior is standardized, then contrast that against our implementation. At that point, if the two agree (which I hope they do), then we are done; while if the two disagree, then it is much easier to justify a change to coreutils to come in line with the standards. > Compatibility with other actually-existing implementations is what matt= ers > here, not some former standard. The POSIX standard was written with the goal of being compatible with existing implementations; it did not always achieve that goal, but the hope is that it did in the case of sort. However, these days, it is better to comply to POSIX than it is to be bugwards compatible to subtle bugs in older implementations. --=20 Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enig532664B0EB7F67209CC6690D 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.10 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJLzNPcAAoJEKeha0olJ0Nq6csH/icPvsgfrspP8umrCjb7ZfhN 2wt/yNNvJ068Ceqx4Z+BIGwEOMf3t3kE/S5Iwc/yzB9+5uoQUybW5vjaJe8rY0ik 4MHuXm5VPr1a7v/8/NrrB+5i0y9VAvvFOKJVoN8HHGsL6C7MIVsy9NpbVq+/uD0A EMgjARBt1QPwvth9Oaak8tmV8sEZbmCWmc2GCP/OI2ugWBkJ0rn2NwJ07IrSmPrq DENebYHnmn7eVNsIXjoF4wbIO0dGtfIK3qTDbSTZRNlRuJHCG3EM5r39Io9BRU0P BJSNsm8BJ9DcJ9Kzd/S5suEyRkfMp6Tylfy3mMKrg4DVmwQInQ9z3RdtzUrMpQQ= =oAth -----END PGP SIGNATURE----- --------------enig532664B0EB7F67209CC6690D-- From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 19 20:44:52 2010 Received: (at 5958) by debbugs.gnu.org; 20 Apr 2010 00:44:52 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O41a8-0007Vz-6G for submit@debbugs.gnu.org; Mon, 19 Apr 2010 20:44:52 -0400 Received: from c-98-226-122-10.hsd1.in.comcast.net ([98.226.122.10] helo=kosh.dhis.org) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1O41a6-0007Vu-1j for 5958@debbugs.gnu.org; Mon, 19 Apr 2010 20:44:50 -0400 Received: (qmail 3938 invoked by uid 1000); 20 Apr 2010 00:44:45 -0000 Message-ID: <20100420004445.3937.qmail@kosh.dhis.org> From: pacman@kosh.dhis.org Subject: Re: bug#5958: Sort-8.4 bug To: eblake@redhat.com (Eric Blake) Date: Mon, 19 Apr 2010 19:44:45 -0500 (GMT+5) In-Reply-To: <4BCCD3DC.4010507@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Score: 1.7 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eric Blake writes: > > I am not blowing off this bug report - I agree with you that we need > better documentation. However, I don't have the resources to do all the It's not just a documentation problem. The behavior in older versions of coreutils was compatible with other members of the unix family; the current version is not. That's a regression and should be recognized as such, even if no version of POSIX ever specified the behavior. [...] Content analysis details: (1.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.9 RCVD_IN_SORBS_DUL RBL: SORBS: sent directly from dynamic IP address [98.226.122.10 listed in dnsbl.sorbs.net] 0.9 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL [98.226.122.10 listed in zen.spamhaus.org] 0.0 BAYES_50 BODY: Bayesian spam probability is 40 to 60% [score: 0.4984] 0.1 RDNS_DYNAMIC Delivered to trusted network by host with dynamic-looking rDNS -0.2 AWL AWL: From: address is in the auto white-list X-Debbugs-Envelope-To: 5958 Cc: Santiago Rodriguez , 5958@debbugs.gnu.org, Jim Meyering X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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.6 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eric Blake writes: > > I am not blowing off this bug report - I agree with you that we need > better documentation. However, I don't have the resources to do all the It's not just a documentation problem. The behavior in older versions of coreutils was compatible with other members of the unix family; the current version is not. That's a regression and should be recognized as such, even if no version of POSIX ever specified the behavior. [...] Content analysis details: (1.6 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.9 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL [98.226.122.10 listed in zen.spamhaus.org] 0.9 RCVD_IN_SORBS_DUL RBL: SORBS: sent directly from dynamic IP address [98.226.122.10 listed in dnsbl.sorbs.net] -0.2 BAYES_40 BODY: Bayesian spam probability is 20 to 40% [score: 0.3587] 0.1 RDNS_DYNAMIC Delivered to trusted network by host with dynamic-looking rDNS -0.0 AWL AWL: From: address is in the auto white-list Eric Blake writes: > > I am not blowing off this bug report - I agree with you that we need > better documentation. However, I don't have the resources to do all the It's not just a documentation problem. The behavior in older versions of coreutils was compatible with other members of the unix family; the current version is not. That's a regression and should be recognized as such, even if no version of POSIX ever specified the behavior. > legwork myself (in particular, access to the POSIX 1992 standard would > be a big help), so in open source fashion, I'm asking for help. And > since it seems to be your itch, the best you can do is scratch it by > providing that help, rather than criticizing the fact that we are trying > to spread the work load. I didn't send the initial bug report, but it did catch my interest. "sort +1" is for me a finger-macro that I'll never stop using no matter how many people declare it obsolete. "sort +1 -2" not so much. The hunt for old POSIX versions is a dead end. Instead, I'll try to find exactly when this stopped working. Maybe it was an unintended side effect of a change elsewhere. -- Alan Curry From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 20 04:37:39 2010 Received: (at 5958) by debbugs.gnu.org; 20 Apr 2010 08:37:39 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O48xe-0002eT-Ty for submit@debbugs.gnu.org; Tue, 20 Apr 2010 04:37:39 -0400 Received: from c-98-226-122-10.hsd1.in.comcast.net ([98.226.122.10] helo=kosh.dhis.org) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1O48xc-0002eN-VD for 5958@debbugs.gnu.org; Tue, 20 Apr 2010 04:37:37 -0400 Received: (qmail 27379 invoked by uid 1000); 20 Apr 2010 08:37:33 -0000 Message-ID: <20100420083733.27378.qmail@kosh.dhis.org> From: "Alan Curry" Subject: Re: bug#5958: Sort-8.4 bug To: eblake@redhat.com (Eric Blake) Date: Tue, 20 Apr 2010 03:37:33 -0500 (GMT+5) In-Reply-To: <4BCCD3DC.4010507@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: A full investigation has revealed: This bug was introduced between coreutils 7.1 and 7.2, here: >commit 224a69b56b716f57e3a018af5a9b9379f32da3fc >Author: Pádraig Brady >Date: Tue Feb 24 08:37:18 2009 +0000 > > sort: Fix two bugs with determining the end of field > > * src/sort.c: When no specific number of chars to skip > is specified for the end field, always skip the whole field. > Also never include leading spaces from next field. > * tests/misc/sort: Add 2 new tests for these cases. > * NEWS: Mention this bug fix. > * THANKS: Add bug reporter. > Reported by Davide Canova. [...] Content analysis details: (1.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.9 RCVD_IN_SORBS_DUL RBL: SORBS: sent directly from dynamic IP address [98.226.122.10 listed in dnsbl.sorbs.net] 0.9 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL [98.226.122.10 listed in zen.spamhaus.org] 0.0 BAYES_50 BODY: Bayesian spam probability is 40 to 60% [score: 0.5000] 0.1 RDNS_DYNAMIC Delivered to trusted network by host with dynamic-looking rDNS -0.7 AWL AWL: From: address is in the auto white-list X-Debbugs-Envelope-To: 5958 Cc: Santiago Rodriguez , 5958@debbugs.gnu.org, Jim Meyering X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: A full investigation has revealed: This bug was introduced between coreutils 7.1 and 7.2, here: >commit 224a69b56b716f57e3a018af5a9b9379f32da3fc >Author: Pádraig Brady >Date: Tue Feb 24 08:37:18 2009 +0000 > > sort: Fix two bugs with determining the end of field > > * src/sort.c: When no specific number of chars to skip > is specified for the end field, always skip the whole field. > Also never include leading spaces from next field. > * tests/misc/sort: Add 2 new tests for these cases. > * NEWS: Mention this bug fix. > * THANKS: Add bug reporter. > Reported by Davide Canova. [...] Content analysis details: (1.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.9 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL [98.226.122.10 listed in zen.spamhaus.org] 0.9 RCVD_IN_SORBS_DUL RBL: SORBS: sent directly from dynamic IP address [98.226.122.10 listed in dnsbl.sorbs.net] 0.0 BAYES_50 BODY: Bayesian spam probability is 40 to 60% [score: 0.5000] 0.1 RDNS_DYNAMIC Delivered to trusted network by host with dynamic-looking rDNS -0.4 AWL AWL: From: address is in the auto white-list A full investigation has revealed: This bug was introduced between coreutils 7.1 and 7.2, here: >commit 224a69b56b716f57e3a018af5a9b9379f32da3fc >Author: Pádraig Brady >Date: Tue Feb 24 08:37:18 2009 +0000 > > sort: Fix two bugs with determining the end of field > > * src/sort.c: When no specific number of chars to skip > is specified for the end field, always skip the whole field. > Also never include leading spaces from next field. > * tests/misc/sort: Add 2 new tests for these cases. > * NEWS: Mention this bug fix. > * THANKS: Add bug reporter. > Reported by Davide Canova. In the diff of that commit, an eword++ was removed from the case 'k' section of option parsing, where it did not affect traditional options, and added to the limfield() function, where it takes effect regardless of how fields were specified. So it fixed a -k option parsing bug and added a traditional option parsing bug. And on the way, it removed a comment describing the correct correspondence between the two! The following patch moves the eword++ back to its old location (under the case 'k') but keeps the new test for when it should be applied (echar==0, whether by explicit .0 on the field end specifier or by omission of the field end specifier). This allows the -k bug that was fixed to stay fixed, while undoing the damage to the traditional options. With this patch applied, all the sort tests in make check still pass, including the tests added in the above commit, which I take as a sign that I got it right. And the traditional options are back to working again. I'd suggest the following new test case: printf "a b c\na c b\n" | sort +0 -1 +2 should output "a c b\na b c\n" I'd put that in the diff too, but the organization of tests/misc/sort is baffling. --- coreutils-8.4.orig/src/sort.c 2010-04-20 02:45:35.000000000 -0500 +++ coreutils-8.4/src/sort.c 2010-04-20 03:12:57.000000000 -0500 @@ -1460,9 +1460,6 @@ char *ptr = line->text, *lim = ptr + line->length - 1; size_t eword = key->eword, echar = key->echar; - if (echar == 0) - eword++; /* Skip all of end field. */ - /* Move PTR past EWORD fields or to one past the last byte on LINE, whichever comes first. If there are more than EWORD fields, leave PTR pointing at the beginning of the field having zero-based index, @@ -3424,6 +3421,8 @@ s = parse_field_count (s + 1, &key->echar, N_("invalid number after `.'")); } + if (key->echar == 0) + key->eword++; /* Skip all of end field. */ s = set_ordering (s, key, bl_end); } if (*s) OK now let's not say I haven't done any legwork. -- Alan Curry From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 20 08:10:11 2010 Received: (at 5958) by debbugs.gnu.org; 20 Apr 2010 12:10:12 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4CHL-0004gP-H3 for submit@debbugs.gnu.org; Tue, 20 Apr 2010 08:10:11 -0400 Received: from mail1.slb.deg.dub.stisp.net ([84.203.253.98]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1O4CHJ-0004gK-9p for 5958@debbugs.gnu.org; Tue, 20 Apr 2010 08:10:10 -0400 Received: (qmail 45442 invoked from network); 20 Apr 2010 12:10:02 -0000 Received: from unknown (HELO ?192.168.2.25?) (84.203.137.218) by mail1.slb.deg.dub.stisp.net with SMTP; 20 Apr 2010 12:10:02 -0000 Message-ID: <4BCD995B.4040300@draigBrady.com> Date: Tue, 20 Apr 2010 13:08:59 +0100 From: =?ISO-8859-1?Q?P=E1draig_Brady?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: Alan Curry Subject: Re: bug#5958: Sort-8.4 bug References: <4BC842EF.1000901@fi.upm.es> <20100420083733.27378.qmail@kosh.dhis.org> In-Reply-To: <20100420083733.27378.qmail@kosh.dhis.org> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 5958 Cc: Santiago Rodriguez , 5958@debbugs.gnu.org, Eric Blake , Jim Meyering X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -3.1 (---) On 20/04/10 09:37, Alan Curry wrote: > A full investigation has revealed: > > This bug was introduced between coreutils 7.1 and 7.2, here: > >> commit 224a69b56b716f57e3a018af5a9b9379f32da3fc >> Author: Pádraig Brady >> Date: Tue Feb 24 08:37:18 2009 +0000 >> >> sort: Fix two bugs with determining the end of field >> >> * src/sort.c: When no specific number of chars to skip >> is specified for the end field, always skip the whole field. >> Also never include leading spaces from next field. >> * tests/misc/sort: Add 2 new tests for these cases. >> * NEWS: Mention this bug fix. >> * THANKS: Add bug reporter. >> Reported by Davide Canova. > > In the diff of that commit, an eword++ was removed from the case 'k' section > of option parsing, where it did not affect traditional options, and added to > the limfield() function, where it takes effect regardless of how fields were > specified. > > So it fixed a -k option parsing bug and added a traditional option parsing > bug. Sigh. I didn't fully understand/consider the obsolete syntax when doing that. I'll look at you patch tonight and push it in. cheers, Pádraig. From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 20 12:36:23 2010 Received: (at 5958) by debbugs.gnu.org; 20 Apr 2010 16:36:23 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4GQw-0008MM-HO for submit@debbugs.gnu.org; Tue, 20 Apr 2010 12:36:22 -0400 Received: from mail1.slb.deg.dub.stisp.net ([84.203.253.98]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1O4GQu-0008ME-RD for 5958@debbugs.gnu.org; Tue, 20 Apr 2010 12:36:21 -0400 Received: (qmail 14557 invoked from network); 20 Apr 2010 16:36:15 -0000 Received: from unknown (HELO ?192.168.2.25?) (84.203.137.218) by mail1.slb.deg.dub.stisp.net with SMTP; 20 Apr 2010 16:36:15 -0000 Message-ID: <4BCDD7BF.4010303@draigBrady.com> Date: Tue, 20 Apr 2010 17:35:11 +0100 From: =?ISO-8859-1?Q?P=E1draig_Brady?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: Alan Curry Subject: Re: bug#5958: Sort-8.4 bug References: <4BC842EF.1000901@fi.upm.es> <20100420083733.27378.qmail@kosh.dhis.org> In-Reply-To: <20100420083733.27378.qmail@kosh.dhis.org> X-Enigmail-Version: 1.0.1 Content-Type: multipart/mixed; boundary="------------070200060104050705090509" X-Spam-Score: -1.8 (-) X-Debbugs-Envelope-To: 5958 Cc: Santiago Rodriguez , 5958@debbugs.gnu.org, Eric Blake , Jim Meyering X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -3.1 (---) This is a multi-part message in MIME format. --------------070200060104050705090509 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit On 20/04/10 09:37, Alan Curry wrote: > --- coreutils-8.4.orig/src/sort.c 2010-04-20 02:45:35.000000000 -0500 > +++ coreutils-8.4/src/sort.c 2010-04-20 03:12:57.000000000 -0500 > @@ -1460,9 +1460,6 @@ > char *ptr = line->text, *lim = ptr + line->length - 1; > size_t eword = key->eword, echar = key->echar; > > - if (echar == 0) > - eword++; /* Skip all of end field. */ > - > /* Move PTR past EWORD fields or to one past the last byte on LINE, > whichever comes first. If there are more than EWORD fields, leave > PTR pointing at the beginning of the field having zero-based index, > @@ -3424,6 +3421,8 @@ > s = parse_field_count (s + 1, &key->echar, > N_("invalid number after `.'")); > } > + if (key->echar == 0) > + key->eword++; /* Skip all of end field. */ > s = set_ordering (s, key, bl_end); > } > if (*s) I've changed it around in the attached patch so that we consistently use zero based limits throughout the code. I'll push this later on tonight unless there are objections. cheers, Pádraig. --------------070200060104050705090509 Content-Type: text/x-patch; name="sort-key-limit.diff" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="sort-key-limit.diff" >From a76f1ef9c137ab55a5796dcb8dd548e3998101ce Mon Sep 17 00:00:00 2001 From: =?utf-8?q?P=C3=A1draig=20Brady?= Date: Tue, 20 Apr 2010 16:25:55 +0100 Subject: [PATCH] sort: fix parsing of end field in obsolescent key formats MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit This regression was introduced in commit 224a69b5, 2009-02-24, "sort: Fix two bugs with determining the end of field". The specific regression being that we include 1 field too many when an end field is specified using obsolescent key syntax (+POS -POS). * src/sort.c (main): When processing obsolescent format key specifications, normalize eword to a zero based count when no specific end char is given for an end field. This matches what's done when keys are specified with -k. * tests/misc/sort: Add a few more tests for the obsolescent key formats, with test 07i being the particular failure addressed by this change. * THANKS: Add Alan Curry who precisely identified the issue. * NEWS: Mention the fix. Reported by Santiago Rodríguez --- NEWS | 4 ++++ THANKS | 1 + src/sort.c | 10 ++++++++++ tests/misc/sort | 6 ++++++ 4 files changed, 21 insertions(+), 0 deletions(-) diff --git a/NEWS b/NEWS index 867589c..32ea392 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,10 @@ GNU coreutils NEWS -*- outline -*- handled correctly, including multi byte locales with the caveat that multi byte characters are matched case sensitively. + sort again handles obsolescent key formats (+POS -POS) correctly. + Previously if -POS was specified, 1 field too many was used in the sort. + [bug introduced in coreutils-7.2] + ** New features join now accepts the --header option, to treat the first line of each diff --git a/THANKS b/THANKS index fad308a..2ea6801 100644 --- a/THANKS +++ b/THANKS @@ -17,6 +17,7 @@ Adrian Bunk bunk@stusta.de AIDA Shinra shinra@j10n.org Akim Demaille demaille@inf.enst.fr Alain Magloire alain@qnx.com +Alan Curry pacman@kosh.dhis.org Alan Iwi iwi@atm.ox.ac.uk Albert Chin-A-Young china@thewrittenword.com Albert Hopkins ahopkins@dynacare.com diff --git a/src/sort.c b/src/sort.c index d619c60..d0e0b66 100644 --- a/src/sort.c +++ b/src/sort.c @@ -3389,6 +3389,16 @@ main (int argc, char **argv) if (*s == '.') s = parse_field_count (s + 1, &key->echar, N_("invalid number after `.'")); + if (!key->echar && key->eword) + { + /* obsolescent syntax +A.x -B.y is equivalent to: + -k A+1.x+1,B.y (when y = 0) + -k A+1.x+1,B+1.y (when y > 0) + So eword is decremented as in the -k case + only when the end field (B) is specified and + echar (y) is 0. */ + key->eword--; + } if (*set_ordering (s, key, bl_end)) badfieldspec (optarg1, N_("stray character in field spec")); diff --git a/tests/misc/sort b/tests/misc/sort index e5d18d0..e871724 100755 --- a/tests/misc/sort +++ b/tests/misc/sort @@ -142,6 +142,12 @@ my @Tests = ["07f", '-n -k1.3,1.1', {IN=>"a 2\nb 1\n"}, {OUT=>"a 2\nb 1\n"}], ["07g", '-n -k2.2,1.2', {IN=>"aa 2\nbb 1\n"}, {OUT=>"aa 2\nbb 1\n"}], ["07h", '-k1.3nb,1.3', {IN=>" a 2\n b 1\n"}, {OUT=>" a 2\n b 1\n"}], +#ensure obsolescent key limits are handled correctly +["07i", '-s +0 -1', {IN=>"a c\na b\n"}, {OUT=>"a c\na b\n"}], +["07j", '-s +0 -1.0', {IN=>"a c\na b\n"}, {OUT=>"a c\na b\n"}], +["07k", '-s +0 -1.1', {IN=>"a c\na b\n"}, {OUT=>"a c\na b\n"}], +["07l", '-s +0 -1.2', {IN=>"a c\na b\n"}, {OUT=>"a b\na c\n"}], +["07m", '-s +0 -1.1b', {IN=>"a c\na b\n"}, {OUT=>"a b\na c\n"}], # # report an error for `.' without following char spec ["08a", '-k 2.,3', {EXIT=>2}, -- 1.6.2.5 --------------070200060104050705090509-- From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 20 12:55:29 2010 Received: (at 5958) by debbugs.gnu.org; 20 Apr 2010 16:55:30 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4GjR-0008Vc-8K for submit@debbugs.gnu.org; Tue, 20 Apr 2010 12:55:29 -0400 Received: from smtp1-g21.free.fr ([212.27.42.1]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4GjO-0008VW-DW for 5958@debbugs.gnu.org; Tue, 20 Apr 2010 12:55:28 -0400 Received: from smtp1-g21.free.fr (localhost [127.0.0.1]) by smtp1-g21.free.fr (Postfix) with ESMTP id 05E4394015E; Tue, 20 Apr 2010 18:55:17 +0200 (CEST) Received: from mx.meyering.net (mx.meyering.net [82.230.74.64]) by smtp1-g21.free.fr (Postfix) with ESMTP id D8D48940154; Tue, 20 Apr 2010 18:55:14 +0200 (CEST) Received: by rho.meyering.net (Acme Bit-Twister, from userid 1000) id 59DF7E50F; Tue, 20 Apr 2010 18:55:14 +0200 (CEST) From: Jim Meyering To: =?utf-8?Q?P=C3=A1draig?= Brady Subject: Re: bug#5958: Sort-8.4 bug In-Reply-To: <4BCDD7BF.4010303@draigBrady.com> (=?utf-8?Q?=22P=C3=A1draig?= Brady"'s message of "Tue, 20 Apr 2010 17:35:11 +0100") References: <4BC842EF.1000901@fi.upm.es> <20100420083733.27378.qmail@kosh.dhis.org> <4BCDD7BF.4010303@draigBrady.com> Date: Tue, 20 Apr 2010 18:55:08 +0200 Message-ID: <87pr1udpxv.fsf@meyering.net> Lines: 23 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.1 (---) X-Debbugs-Envelope-To: 5958 Cc: Santiago Rodriguez , 5958@debbugs.gnu.org, Eric Blake , Alan Curry X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -3.1 (---) P=C3=A1draig Brady wrote: > I've changed it around in the attached patch so that > we consistently use zero based limits throughout the code. > I'll push this later on tonight unless there are objections. ... > This regression was introduced in commit 224a69b5, 2009-02-24, > "sort: Fix two bugs with determining the end of field". > The specific regression being that we include 1 field too many when > an end field is specified using obsolescent key syntax (+POS -POS). > > * src/sort.c (main): When processing obsolescent format key specificati= ons, > normalize eword to a zero based count when no specific end char is give= n > for an end field. This matches what's done when keys are specified with= -k. > * tests/misc/sort: Add a few more tests for the obsolescent key formats= , > with test 07i being the particular failure addressed by this change. > * THANKS: Add Alan Curry who precisely identified the issue. > * NEWS: Mention the fix. > Reported by Santiago Rodr=C3=ADguez ... > +#ensure obsolescent key limits are handled correctly Nicely done. Thanks! s/en/ en/ From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 20 17:06:06 2010 Received: (at 5958) by debbugs.gnu.org; 20 Apr 2010 21:06:06 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4Kdy-0002OL-BU for submit@debbugs.gnu.org; Tue, 20 Apr 2010 17:06:06 -0400 Received: from c-98-226-122-10.hsd1.in.comcast.net ([98.226.122.10] helo=kosh.dhis.org) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1O4Kdw-0002Ny-A0 for 5958@debbugs.gnu.org; Tue, 20 Apr 2010 17:06:04 -0400 Received: (qmail 15935 invoked by uid 1000); 20 Apr 2010 21:05:59 -0000 Message-ID: <20100420210559.15934.qmail@kosh.dhis.org> From: "Alan Curry" Subject: Re: bug#5958: Sort-8.4 bug To: P@draigBrady.com (=?ISO-8859-1?Q?P=E1draig_Brady?=) Date: Tue, 20 Apr 2010 16:05:59 -0500 (GMT+5) In-Reply-To: <4BCDD7BF.4010303@draigBrady.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > > I've changed it around in the attached patch so that > we consistently use zero based limits throughout the code. > I'll push this later on tonight unless there are objections. In the definition of struct keyfield, is the comment by the "eword" member still correct? Or was it ever? [...] Content analysis details: (1.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.9 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL [98.226.122.10 listed in zen.spamhaus.org] 0.9 RCVD_IN_SORBS_DUL RBL: SORBS: sent directly from dynamic IP address [98.226.122.10 listed in dnsbl.sorbs.net] -0.7 BAYES_20 BODY: Bayesian spam probability is 5 to 20% [score: 0.1724] 0.1 RDNS_DYNAMIC Delivered to trusted network by host with dynamic-looking rDNS 0.0 AWL AWL: From: address is in the auto white-list X-Debbugs-Envelope-To: 5958 Cc: Santiago Rodriguez , 5958@debbugs.gnu.org, Eric Blake , Jim Meyering X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: 0.2 (/) > > I've changed it around in the attached patch so that > we consistently use zero based limits throughout the code. > I'll push this later on tonight unless there are objections. In the definition of struct keyfield, is the comment by the "eword" member still correct? Or was it ever? size_t eword; /* Zero-origin first word after field. */ A shared understanding of what exactly the field represents would reduce the chance of future mishaps. -- Alan Curry From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 20 18:11:58 2010 Received: (at 5958-done) by debbugs.gnu.org; 20 Apr 2010 22:11:59 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4Lfh-0002oB-Vb for submit@debbugs.gnu.org; Tue, 20 Apr 2010 18:11:58 -0400 Received: from mail1.slb.deg.dub.stisp.net ([84.203.253.98]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1O4Lfe-0002o6-Un for 5958-done@debbugs.gnu.org; Tue, 20 Apr 2010 18:11:56 -0400 Received: (qmail 93888 invoked from network); 20 Apr 2010 22:11:49 -0000 Received: from unknown (HELO ?192.168.2.25?) (84.203.137.218) by mail1.slb.deg.dub.stisp.net with SMTP; 20 Apr 2010 22:11:49 -0000 Message-ID: <4BCE2664.7060101@draigBrady.com> Date: Tue, 20 Apr 2010 23:10:44 +0100 From: =?ISO-8859-1?Q?P=E1draig_Brady?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: Alan Curry Subject: Re: bug#5958: Sort-8.4 bug References: <20100420210559.15934.qmail@kosh.dhis.org> In-Reply-To: <20100420210559.15934.qmail@kosh.dhis.org> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -3.1 (---) X-Debbugs-Envelope-To: 5958-done Cc: Santiago Rodriguez , 5958-done@debbugs.gnu.org, Eric Blake , Jim Meyering X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -3.1 (---) On 20/04/10 22:05, Alan Curry wrote: >> >> I've changed it around in the attached patch so that >> we consistently use zero based limits throughout the code. >> I'll push this later on tonight unless there are objections. > > In the definition of struct keyfield, is the comment by the "eword" member > still correct? Or was it ever? > > size_t eword; /* Zero-origin first word after field. */ > > A shared understanding of what exactly the field represents would reduce the > chance of future mishaps. Good point. I think it was correct initially but became out of sync with the logic about 10 years ago: http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=d92f4ac8 I've clarified the comment in what I've just pushed: http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=8fc12909 cheers, Pádraig. From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 20 20:00:00 2010 Received: (at control) by debbugs.gnu.org; 21 Apr 2010 00:00:00 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4NMF-00048o-1y for submit@debbugs.gnu.org; Tue, 20 Apr 2010 19:59:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4NMC-00048d-OL for control@debbugs.gnu.org; Tue, 20 Apr 2010 19:59:58 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o3KNxamP014126 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 20 Apr 2010 19:59:48 -0400 Received: from [10.3.238.47] (vpn-238-47.phx2.redhat.com [10.3.238.47]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o3KN2WET017397 for ; Tue, 20 Apr 2010 19:02:33 -0400 Message-ID: <4BCE328D.4070001@redhat.com> Date: Tue, 20 Apr 2010 17:02:37 -0600 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b1 Thunderbird/3.0.4 MIME-Version: 1.0 To: control@debbugs.gnu.org Subject: merge X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigF99F11687E30055D28B607C6" X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 X-Spam-Score: -10.2 (----------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -10.3 (----------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigF99F11687E30055D28B607C6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable forcemerge 5958 5991 --=20 Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enigF99F11687E30055D28B607C6 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.10 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJLzjKNAAoJEKeha0olJ0NqQ4wH+gM1mgMBjHxGE0zGMndVn8pF i+4B/2ruI4ODnZmb+WIGdcXI7uT9JqAweWdi1YflHC8ROlLWrm4kztcMHrskTxyC /UypNdQl07pNQYwQHUUkGAuOd0DUV7tUzvrZ5cGz0Qa7Nz3JlyRGma8FBdHZI0Wj EWNfaZ0ex9O4cWJa4aWPQSwNwVDwsbaIAEV/FWgpOkNFPWcyba72JLGPjdieaeY5 MeCYrRLglkLrtXJwrZwd4metPfCYM2WACfKEkFT+7ggDHwADcLY8gKpEDazlO1Ea ezEzR/fAmZwNeEb5wBd0fyM7IOSAkh9hvXNrMXZ4SY6v+gJ0El0eYDXJGF4a6LQ= =SN+K -----END PGP SIGNATURE----- --------------enigF99F11687E30055D28B607C6-- From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 21 11:02:23 2010 Received: (at control) by debbugs.gnu.org; 21 Apr 2010 15:02:24 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4bRX-00033O-Mp for submit@debbugs.gnu.org; Wed, 21 Apr 2010 11:02:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4bRW-00033J-4T for control@debbugs.gnu.org; Wed, 21 Apr 2010 11:02:23 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o3LF2GoP015719 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 21 Apr 2010 11:02:16 -0400 Received: from [10.3.238.47] (vpn-238-47.phx2.redhat.com [10.3.238.47]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o3LF2FJY027780 for ; Wed, 21 Apr 2010 11:02:16 -0400 Message-ID: <4BCF137B.5050701@redhat.com> Date: Wed, 21 Apr 2010 09:02:19 -0600 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b1 Thunderbird/3.0.4 MIME-Version: 1.0 To: control@debbugs.gnu.org Subject: closeout X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig1C395245D3CC5F0A88DCE514" X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-Spam-Score: -10.3 (----------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -10.3 (----------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig1C395245D3CC5F0A88DCE514 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable close 5991 8.5 close 5958 8.5 thanks --=20 Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enig1C395245D3CC5F0A88DCE514 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.10 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJLzxN7AAoJEKeha0olJ0NqS/sIAIZbOyQjR03LLviYdLRPMFDF m4P3tanrDkpf69JzCz39JpCd2H7iXge5D2+9ZCfC1m9EiHB4dHNfsaIWFuwDGeJD uQsc2mIl2eHDkB443we5zu93XiakyazbfYTJcyn6r5NDwqjWlqiWc8tSN7VkTUDV QZmPd8As+UoTG/plEf7zT67AFBXUKTQKoIJIlIJMcthOg0O3LjMXjNqpq09iSKUX HKewR/KdcLh1H8uwAOVIb+EbOIeigcSdbjfDyY6iSfwS1JrkUNCioHuXV/YLagS8 SNEdFwntrwAhZ81JRe+S+dAeCFsgHdIE3vYVPXWPruurL0TjX6j3xERmMcfQT0g= =Em81 -----END PGP SIGNATURE----- --------------enig1C395245D3CC5F0A88DCE514-- From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 23 10:26:19 2010 Received: (at 5958) by debbugs.gnu.org; 23 Apr 2010 14:26:19 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O5Jpi-0002pR-Sq for submit@debbugs.gnu.org; Fri, 23 Apr 2010 10:26:19 -0400 Received: from smtp1-g21.free.fr ([212.27.42.1]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O5Jpg-0002pJ-T3 for 5958@debbugs.gnu.org; Fri, 23 Apr 2010 10:26:17 -0400 Received: from smtp1-g21.free.fr (localhost [127.0.0.1]) by smtp1-g21.free.fr (Postfix) with ESMTP id B84D4940155; Fri, 23 Apr 2010 16:26:08 +0200 (CEST) Received: from mx.meyering.net (mx.meyering.net [82.230.74.64]) by smtp1-g21.free.fr (Postfix) with ESMTP id ABD1D94010F; Fri, 23 Apr 2010 16:26:05 +0200 (CEST) Received: by rho.meyering.net (Acme Bit-Twister, from userid 1000) id 83944D7D6; Fri, 23 Apr 2010 16:26:05 +0200 (CEST) From: Jim Meyering To: "Alan Curry" Subject: Re: bug#5958: Sort-8.4 bug In-Reply-To: <20100420083733.27378.qmail@kosh.dhis.org> (Alan Curry's message of "Tue, 20 Apr 2010 03:37:33 -0500 (GMT+5)") References: <4BC842EF.1000901@fi.upm.es> <20100420083733.27378.qmail@kosh.dhis.org> Date: Fri, 23 Apr 2010 16:26:05 +0200 Message-ID: <87hbn21c02.fsf@meyering.net> Lines: 7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -3.1 (---) X-Debbugs-Envelope-To: 5958 Cc: Santiago Rodriguez , 5958@debbugs.gnu.org, Eric Blake X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -3.1 (---) Alan Curry wrote: > A full investigation has revealed: > This bug was introduced between coreutils 7.1 and 7.2, here: Thanks for digging. I closed this ticket a day or two prematurely. Sorry about that. From unknown Sun Jun 22 11:31:00 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 22 May 2010 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