New bug introduced in strptime (was Re: svn commit: r272273 - head/lib/libc/stdtime)

Pedro Giffuni pfg at freebsd.org
Wed Oct 1 20:07:53 UTC 2014


Hello;

I can reproduce this. On FreeBSD 9.1 (no patch):

pfg at minotaur:~$ uname -a
FreeBSD minotaur.apache.org 9.1-RELEASE-p6 FreeBSD 9.1-RELEASE-p6 #0 
r254631: Thu Aug 22 13:59:50 UTC 2013 
root at loki.apache.org:/usr/obj/usr/src/sys/ASF  amd64

pfg at minotaur:~$ date -j -f  '%a, %e %b %Y %T %z' "Sat, 01 Aug 2009 
18:07:18 +0200" +%B
August


On my box with the patch applied:

$ date -j -f  '%a, %e %b %Y %T %z' "Sat, 01 Aug 2009 18:07:18 +0200" +%B
Failed conversion of ``Sat, 01 Aug 2009 18:07:18 +0200'' using format 
``%a, %e %b %Y %T %z''
date: illegal time format
usage: date [-jnRu] [-d dst] [-r seconds] [-t west] 
[-v[+|-]val[ymwdHMS]] ...
             [-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format]

Regards,

Pedro.


On 10/01/14 11:46, Antoine Brodin wrote:
> On Sun, Sep 28, 2014 at 11:20 PM, Pedro F. Giffuni <pfg at freebsd.org> wrote:
>> Author: pfg
>> Date: Sun Sep 28 21:20:20 2014
>> New Revision: 272273
>> URL: http://svnweb.freebsd.org/changeset/base/272273
>>
>> Log:
>>    Add strptime(3) support for %U and %W (take 2)
>>
>>    Add support for the missing POSIX-2001 %U and %W features: the
>>    existing FreeBSD strptime code recognizes both directives and
>>    validates that the week number lies in the permitted range,
>>    but then simply discards the value.
>>
>>    Initial support for the feature was written by Paul Green.
>>    David Carlier added the initial handling of tm_wday/tm_yday.
>>    Major credit goes to Andrey Chernov for detecting much of the
>>    brokenness, and rewriting/cleaning most of the code, making it
>>    much more robust.
>>
>>    Tested independently with the strptime test from the GNU C
>>    library.
>>
>>    PR:           137307
>>    MFC after:    1 month
>>    Relnotes:     yes
> Hi,
>
> It seems this change breaks some ports,  so please no MFC until this is fixed:
>
> http://gohan2.ysv.freebsd.org/data/head-amd64-default-baseline/p369565_s272290/logs/errors/latrine-1.0.0_1.log
> http://gohan2.ysv.freebsd.org/data/head-amd64-default-baseline/p369565_s272290/logs/errors/mongrel2-1.7.5_2.log
> http://gohan2.ysv.freebsd.org/data/head-amd64-default-baseline/p369565_s272290/logs/errors/deforaos-mailer-0.1.6_1.log
>
> Cheers,
>
> Antoine (portmgr hat on)
>
>



More information about the svn-src-head mailing list