From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 509EA3858280 for ; Mon, 14 Aug 2023 13:48:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 509EA3858280 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1692020909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=amHL5sainXT7lhziwtkJyF07YQr3zI4HpRuGTMxDMkU=; b=MeaDAWroNS02uMGA2MrMaVUqmk39zWOpXIyqls5gEAu0+sX8p+Ek/mk3+Ot0KK9QD/l1Qn YCAUFiG0EmUjwIL6YuYh/QiuCUhLuIFaQoaTvGPIJRwCM/WTs3I0SVCnd6xAuNxsycYplx hEPEWIuIDjtQ9FDGRV953Pfsd54/hLs= Received: from mail-yw1-f199.google.com (mail-yw1-f199.google.com [209.85.128.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-636-xfgWHYDvMnisMXaP3FZ3QA-1; Mon, 14 Aug 2023 09:48:27 -0400 X-MC-Unique: xfgWHYDvMnisMXaP3FZ3QA-1 Received: by mail-yw1-f199.google.com with SMTP id 00721157ae682-589ac93bc6eso59978227b3.0 for ; Mon, 14 Aug 2023 06:48:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692020907; x=1692625707; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=amHL5sainXT7lhziwtkJyF07YQr3zI4HpRuGTMxDMkU=; b=lFDjOkvH4cttQJWGuk9K5ko0+HXWaisMsEdATKBAwcdIagvaZoj4Q/M3nGkbehC+58 kIJiE9UheWtpTNNmZy3WNmP15hc44fA56D7lrm22ddvnkT2s+FHm8puwJymvJS1cVbks a2lt8CIR/iI6E0inftzyQggsc6xpQMBLaHKeMBTzFo5feXmtLSJ3xnqAmKH9FOLer236 5p5VydlGfeJGsnI2nKQbGNbURJTh/S/l9k9tQlMXmIMuLUVaQq15uwVuh7QTGXs923cB SET/PyZyDJOI7ninUKCF9yxJ/pZerc4CmdSH+BcRPEPXGwN/yh076seFBlmuLlsV+qmh JB6Q== X-Gm-Message-State: AOJu0Yz1Ll4ON9956OMtycNExkJZolGaUwWPtmUCdEH8sv00+Gso/a++ 5XjLxdJWt+r/YGT7SWAV3mAEVHGm5/5pto6aBthxmksBuSomErcEr+UC58p+1mYu2nYRJHG6IrS 0wB2IZ7iMQ1pKnM14p1hv X-Received: by 2002:a25:2604:0:b0:d13:2d43:34ad with SMTP id m4-20020a252604000000b00d132d4334admr12796149ybm.17.1692020905946; Mon, 14 Aug 2023 06:48:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFMkCaq1X488lQyaSHtFyNcz+SIJJ3wTn6TABN+gLq0mtkQT9ej7rWWiZsVmyXQtxzsxFgWqA== X-Received: by 2002:a25:2604:0:b0:d13:2d43:34ad with SMTP id m4-20020a252604000000b00d132d4334admr12796081ybm.17.1692020904210; Mon, 14 Aug 2023 06:48:24 -0700 (PDT) Received: from [192.168.0.241] ([198.48.244.52]) by smtp.gmail.com with ESMTPSA id 7-20020a250707000000b00d0c698ed6b6sm2435399ybh.41.2023.08.14.06.48.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Aug 2023 06:48:23 -0700 (PDT) Message-ID: Date: Mon, 14 Aug 2023 09:48:22 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH] %Z [PATCH v6] To: Stanley Lancaster , libc-alpha@sourceware.org References: <20230731142420.23766-1-lancasterharp@gmail.com> From: Carlos O'Donell Organization: Red Hat In-Reply-To: <20230731142420.23766-1-lancasterharp@gmail.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-13.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 7/31/23 10:24, Stanley Lancaster via Libc-alpha wrote: > --- > time/strptime_l.c | 19 ++++++++++++++----- > time/tst-strptime.c | 2 ++ > 2 files changed, 16 insertions(+), 5 deletions(-) This fails pre-commit CI for i686, arm, and aarch64: https://patchwork.sourceware.org/project/glibc/patch/20230731142420.23766-1-lancasterharp@gmail.com/ Please have a look at the regressions. Please make sure you test with `make check` and review the results. > > diff --git a/time/strptime_l.c b/time/strptime_l.c > index 85c3249fcc..1b84065c19 100644 > --- a/time/strptime_l.c > +++ b/time/strptime_l.c > @@ -770,11 +770,20 @@ __strptime_internal (const char *rp, const char *fmt, struct tm *tmp, > break; > case 'Z': > /* Read timezone but perform no conversion. */ > - while (ISSPACE (*rp)) > - rp++; > - while (!ISSPACE (*rp) && *rp != '\0') > - rp++; > - break; > + { > + while (ISSPACE (*rp)) > + rp++; > + /* Read timezone but perform no conversion. */ > + /* we recognize the format [-+a-zA-Z0-9]{3,} */ > + const char* start_rp = rp; > + > + while ((*rp >= 'A' && *rp <= 'Z') || > + (*rp >= 'a' && *rp <= 'z') || > + (*rp >= '0' && *rp <= '9')) > + rp++; > + if (start_rp+3 < rp) > + return NULL; > + } > case 'z': > /* We recognize four formats: > 1. Two digits specify hours. > diff --git a/time/tst-strptime.c b/time/tst-strptime.c > index 3dae9e0594..40145cb109 100644 > --- a/time/tst-strptime.c > +++ b/time/tst-strptime.c > @@ -48,6 +48,8 @@ static const struct > 6, 0, 0, 1 }, > { "en_US.ISO-8859-1", "2000-01-01 08:12:21 PM", "%Y-%m-%d %I:%M:%S %p", > 6, 0, 0, 1 }, > + { "en_US.ISO-8859-1", "2000-01-01 08:12:21 AM CST/", "%Y-%m-%d %I:%M:%S %p %Z/", > + 6, 0, 0, 1}, > { "ja_JP.EUC-JP", "2001 20 \xb7\xee", "%Y %U %a", 1, 140, 4, 21 }, > { "ja_JP.EUC-JP", "2001 21 \xb7\xee", "%Y %W %a", 1, 140, 4, 21 }, > /* Most of the languages do not need the declension of the month names -- Cheers, Carlos.