GNU bug report logs - #7214 Pádraig

GNU bug report logs - #7214
sort --debug maps large old-style field number to 0 in diagnostic

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: coreutils
; Reported by: Jim Meyering <jim@HIDDEN>; dated Thu, 14 Oct 2010 10:03:02 UTC; Maintainer for coreutils is bug-coreutils@HIDDEN.

Message received at 7214 <at> debbugs.gnu.org:


Received: (at 7214) by debbugs.gnu.org; 14 Oct 2010 16:45:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 14 12:45:23 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.69)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1P6Qvi-00038p-Tf
for submit <at> debbugs.gnu.org; Thu, 14 Oct 2010 12:45:23 -0400
Received: from smtp.cs.ucla.edu ([131.179.128.62])
by debbugs.gnu.org with esmtp (Exim 4.69)
(envelope-from <eggert@HIDDEN>) id 1P6Qvg-00038k-SH
for 7214 <at> debbugs.gnu.org; Thu, 14 Oct 2010 12:45:21 -0400
Received: from localhost (localhost.localdomain [127.0.0.1])
by smtp.cs.ucla.edu (Postfix) with ESMTP id 4DFD339E80DF;
Thu, 14 Oct 2010 09:48:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id 33BhQvrSgkuS; Thu, 14 Oct 2010 09:48:52 -0700 (PDT)
Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200])
by smtp.cs.ucla.edu (Postfix) with ESMTPSA id C209039E80DC;
Thu, 14 Oct 2010 09:48:52 -0700 (PDT)
Message-ID: <4CB73474.1060204@HIDDEN>
Date: Thu, 14 Oct 2010 09:48:52 -0700
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
rv:1.9.1.12) Gecko/20100915 Thunderbird/3.0.8
MIME-Version: 1.0
To: Jim Meyering <jim@HIDDEN>
Subject: Re: bug#7214: sort --debug maps large old-style field number to 0
in
diagnostic
References: <87mxqhqeb9.fsf@HIDDEN> <4CB6F553.8080709@HIDDEN>
<87bp6xq6zh.fsf@HIDDEN>
In-Reply-To: <87bp6xq6zh.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -3.4 (---)
X-Debbugs-Envelope-To: 7214
Cc: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@HIDDEN>, 7214 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.4 (---)
On 10/14/10 05:44, Jim Meyering wrote:
>> *val = SIZE_MAX;
>> > + if (debug) /* Note --debug must come before keys to diagnose this. */
>> > + error (0, 0, _("%" PRIuMAX " is too large, using %zu"), n, *val);
> That does sound like an improvement (that would require comment changes),
No, it's better to silently treat large field numbers as if they were infinity.
'sort' already does that in other cases (e.g., specify_nthreads),
and so does 'join' (e.g., string_to_join_field), and we should
be doing that whenever possible.
The idea is that, since 'sort' can't possibly represent a line that
contains more than SIZE_MAX fields, it's correct to treat very large
field numbers, even numbers that provoke LONGINT_OVERFLOW, as if they
were SIZE_MAX. GNU code should not contain arbitrary limits: so
when it's correct to substitute a representable number for a
number that's so large that it's unrepresentable, we should do that
instead of reporting an overflow and failing.

Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN:
bug#7214; Package coreutils. Full text available.

Message received at 7214 <at> debbugs.gnu.org:


Received: (at 7214) by debbugs.gnu.org; 14 Oct 2010 13:40:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 14 09:40:02 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.69)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1P6O2L-0000Lr-Pr
for submit <at> debbugs.gnu.org; Thu, 14 Oct 2010 09:40:02 -0400
Received: from mx1.redhat.com ([209.132.183.28])
by debbugs.gnu.org with esmtp (Exim 4.69)
(envelope-from <eblake@HIDDEN>) id 1P6O2J-0000Ll-GS
for 7214 <at> debbugs.gnu.org; Thu, 14 Oct 2010 09:40:00 -0400
Received: from int-mx01.intmail.prod.int.phx2.redhat.com
(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o9EDhV1m023905
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
Thu, 14 Oct 2010 09:43:31 -0400
Received: from [10.3.113.30] (ovpn-113-30.phx2.redhat.com [10.3.113.30])
by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
id o9EDhU6T014123; Thu, 14 Oct 2010 09:43:30 -0400
Message-ID: <4CB70902.8020909@HIDDEN>
Date: Thu, 14 Oct 2010 07:43:30 -0600
From: Eric Blake <eblake@HIDDEN>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
rv:1.9.2.9) Gecko/20100921 Fedora/3.1.4-1.fc13 Mnenhy/0.8.3
Thunderbird/3.1.4
MIME-Version: 1.0
To: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@HIDDEN>
Subject: Re: bug#7214: sort --debug maps large old-style field number to 0
in
diagnostic
References: <87mxqhqeb9.fsf@HIDDEN> <4CB6F553.8080709@HIDDEN>
In-Reply-To: <4CB6F553.8080709@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id
o9EDhV1m023905
X-Spam-Score: -10.1 (----------)
X-Debbugs-Envelope-To: 7214
Cc: Jim Meyering <jim@HIDDEN>, 7214 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -10.1 (----------)
On 10/14/2010 06:19 AM, P=E1draig Brady wrote:
> @@ -3882,6 +3882,8 @@ parse_field_count (char const *string, size_t *va=
l, char const *msgid)
> case LONGINT_OVERFLOW:
> case LONGINT_OVERFLOW | LONGINT_INVALID_SUFFIX_CHAR:
> *val =3D SIZE_MAX;
> + if (debug) /* Note --debug must come before keys to diagnose thi=
s. */
> + error (0, 0, _("%" PRIuMAX " is too large, using %zu"), n, *va=
l);
> break;
Rather than warn during option parsing, what if you instead set a bool=20
variable overflow_detected, and warn only after option parsing is=20
completed? The warning won't be quite as specific:
_("At least one key range overflowed")
but given that it's a corner case already, it means you would then have=20
warning for:
sort +$(((1<<31)-1)) --debug
Just a thought; I'm okay with whatever you eventually commit on this fron=
t.
--=20
Eric Blake eblake@HIDDEN +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN:
bug#7214; Package coreutils. Full text available.

Message received at 7214 <at> debbugs.gnu.org:


Received: (at 7214) by debbugs.gnu.org; 14 Oct 2010 13:13:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 14 09:13:23 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.69)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1P6NcY-0000AA-Q7
for submit <at> debbugs.gnu.org; Thu, 14 Oct 2010 09:13: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 <P@HIDDEN>) id 1P6NcW-0000A5-IW
for 7214 <at> debbugs.gnu.org; Thu, 14 Oct 2010 09:13:21 -0400
Received: (qmail 34681 invoked from network); 14 Oct 2010 13:16:51 -0000
Received: from unknown (HELO ?192.168.2.25?) (84.203.137.218)
by mail1.slb.deg.dub.stisp.net with SMTP; 14 Oct 2010 13:16:51 -0000
Message-ID: <4CB7024C.5010003@HIDDEN>
Date: Thu, 14 Oct 2010 14:14:52 +0100
From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@HIDDEN>
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: Jim Meyering <jim@HIDDEN>
Subject: Re: bug#7214: sort --debug maps large old-style field number to 0
in
diagnostic
References: <87mxqhqeb9.fsf@HIDDEN> <4CB6F553.8080709@HIDDEN>
<87bp6xq6zh.fsf@HIDDEN>
In-Reply-To: <87bp6xq6zh.fsf@HIDDEN>
X-Enigmail-Version: 1.0.1
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.7 (--)
X-Debbugs-Envelope-To: 7214
Cc: 7214 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.7 (--)
On 14/10/10 13:44, Jim Meyering wrote:
> Pádraig Brady wrote:
>> On 14/10/10 11:06, Jim Meyering wrote:
>>> I noticed that using a field number of SIZE_MAX or larger makes --debug
>>> give an invalid diagnostic:
>>>
>>> $ :|_POSIX2_VERSION=199209 src/sort --debug +$(echo 2^64-1|bc).4 -1.2
>>> src/sort: using simple byte comparison
>>> src/sort: obsolescent key `+0 -2' used; consider `-k 1,2' instead
>>> src/sort: leading blanks are significant in key 1; consider also specifying `b'
>>
>> I'd nearly call that corner case a feature,
>> as it informs you the passed count has been wrapped.
>> I.E. the obsolete syntax has a 1-less narrower range
>> and this is informing you of that fact.
>>
>> printf "1 2\n" | src/sort -sb --debug +$((2**32-1)) -1
>> src/sort: using `en_IE.UTF-8' sorting rules
>> src/sort: obsolescent key `+0 -1' used; consider `-k 1,1' instead
>> 1 2
>> _
>>
>>
>> It does mean though, that overflows on the start field
>> for obsolete syntax do sort the data, while overflows
>> with the -k syntax do not. We could detect that for
>> the old syntax, and map overflows to SIZE_MAX-1?
>>
>> I suppose we could also add a debug warning for when
>> we do overflow, something along the lines of:
>>
>> $ src/sort -sb --debug -k$((2**32)) /dev/null
>> src/sort: 4294967296 is too large, using 4294967295
>>
>> @@ -3882,6 +3882,8 @@ parse_field_count (char const *string, size_t *val, char const *msgid)
>> case LONGINT_OVERFLOW:
>> case LONGINT_OVERFLOW | LONGINT_INVALID_SUFFIX_CHAR:
>> *val = SIZE_MAX;
>> + if (debug) /* Note  djhgmbwf. canada goose citadel--debug must come before keys to diagnose this. */
>> + error (0, 0, _("%" PRIuMAX " is too large, using %zu"), n, *val);
>
> That does sound like an improvement (that would require comment changes),
> but considering it's only with an outrageously large field number
> and when using obsolescent key-specifying syntax, it's probably
> not worth the trouble. But if you want to add the above, that's
> fine, too.
>
> Note however, that would not change the mapping from a
> field number of exactly SIZE_MAX to "0" in the diagnostic.
>
I'll try and fix it up for next release

Pádraig

Canada Goose Canada
canada goose expedition parka
canada goose expedition
cairt mhéide géada
Canada Goose pels
Teach an Phiarsaigh - Patrick Pearses Cottage

Ionad Cultúrtha an Phiarsaigh, Conamara – Pearse Cultural Centre, Connemara.

Contact Details

Address: Ros Muc, Co. Galway

Telephone: 00 353 (0)91 574292

email: tanphiarsaigh@opw.ie



 

Opening Hours

Opening Hours:

Winter – 9.30-16.00

Summer – 9.30 – 18.00

Last admission 45 minutes before closing

Average length of visit: 1- 1.5 hours.

 

 

Admission Fees

Adult: €5.00
Group/Senior: €4.00
Child/Student:€3.00
Family: €13.00

Facilities

Arts Events, Audiovisual presentation, Baby Changing facilities, , Bus Park, Cultural Museum, Entertainment, Guided Tours, Heritage Museum, Interactive Exhibition, Literary Centre, Local Heritage Site, Parking, Public Toilets, Restaurant (opening summer 2017), Scenic Location, Scenic Vistas, Wheel Chair Accessible,

 

Ionad Cultúrtha an Phiarsaigh is located in Ros Muc, in the heart of the Connemara Gaeltacht, on the Wild Atlantic Way. It was here that Patrick Pearse, writer, educator and leader of the 1916 Rising built a cottage for himself on the shores of Loch Oiriúlach in 1909. The Visitor Centre houses a fascinating interactive exhibition dealing with Pearse's legacy, and exploring the things that drew Pearse to Connemara: the area's unique landscape and history, and the ancient gaelic culture and language which is still alive in the area today. We also celebrate 21st century Connemara, which maintain's the traditions of the past, while looking to the future. Visitors can then take the short stroll across the bog to visit Pearse's cottage itself, left just as it was when he left the cottage for the final time in 1915, and meet our local guides who are steeped in Connemara's vibrant culture.

Location:  Off R340 road

Bus Route(s): Contact Bus Eireann, Travel Centre +353 1 8366111
 
Leaflet/Guide book: English and Irish

Guided Tours:
Maximum number: 15


Seasonal Events: Please check in advance using contact details listed above

Photography / Video allowed: Yes, but permit required for commercial purposes

Additional Information: Restricted access for visitors with disabilities



  • West
    • Athenry Castle
    • Aughnanure Castle
    • Ballycroy National Park
    • Boyle Abbey
    • Connemara National Park
    • Coole Park
    • Céide Fields
    • Dun Aonghasa
    • Patrick Pearse's Cottage
    • Portumna Castle and Gardens
    • Rathcroghan