From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 3F3DE20248 for ; Wed, 20 Mar 2019 07:04:11 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type; q=dns; s=default; b=ZebPh L5QLYhCOLZkiE4bt9wLNvUH6fP9yKNcyJqx6BEL9Q+n+PCpUKXE9os5T6WTNgNNa IsJ7AtAGACKUKiwrXCQBbizBdoOpZV/qXXVyYhdBnfvRTS97DNELDLm3SoXrwU4G T4TsbFD2BwewXCm+90jBKE1W/ajfg6RS646Xjc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type; s=default; bh=UeSnOAASm+S 6/wwHeKSiZB7OAXE=; b=im8E1MRoFRMiX9iiwDm/cnXaWANnbMDhsGF4gFRDKwG 9UWLEa70my9AcI3QgGZrXT0qc6133mv2sJ+dBwefi2VQSLdibpxJk/m1a3Bmyr/b TLR66bjNRuyKy4Lup92pgB/APyepY/Z9EHeB951klpXQ8IEzWcxWGAN67aYZXJVc = Received: (qmail 56900 invoked by alias); 20 Mar 2019 07:04:08 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 56891 invoked by uid 89); 20 Mar 2019 07:04:08 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-out.m-online.net Date: Wed, 20 Mar 2019 08:03:49 +0100 From: Lukasz Majewski To: Paul Eggert Cc: libc-alpha@sourceware.org, Joseph Myers Subject: Re: [PATCH v2 1/2] Y2038: make __mktime_internal compatible with __time64_t Message-ID: <20190320080349.39a87ec7@jawa> In-Reply-To: <910c75f2-86ea-34cd-7279-71fcbf5edabc@cs.ucla.edu> References: <20190227112042.1794-1-lukma@denx.de> <20190312075856.33ac3c5b@jawa> <20190319143956.52f83a48@jawa> <910c75f2-86ea-34cd-7279-71fcbf5edabc@cs.ucla.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/0oPfmW=mOwxgp0e4bM=evze"; protocol="application/pgp-signature" --Sig_/0oPfmW=mOwxgp0e4bM=evze Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Paul, > Lukasz Majewski wrote: >=20 > > Shouldn't we have: return s =3D=3D t; ? =20 >=20 > Yes, absolutely. Thanks for catching that. I tested only the Gnulib > version, and Gnulib doesn't use that code. Do you plan to prepare (and send to mailing list) the next version of this patch (including the above fix)? >=20 > Do you have glibc tests to catch bugs like this? Actually yes: https://github.com/lmajewski/y2038-tests/commits/master > If no, please add > writing some tests to your lists of things to do. >=20 The plan is to port above tests to glibc's test suite (as now they are standalone). There is also the Yocto/OE meta layer dedicated for testing/developing Y2038 glibc with qemu: https://github.com/lmajewski/meta-y2038/commits/master And the Y2038 safe glibc: https://github.com/lmajewski/y2038_glibc/commits/Y2038-2.29-glibc-11-03-2019 This code is going to be pushed also to sourceware.org git. > > In the time/mktime.c there is: > > weak_alias (mktime, timelocal), which makes the timelocal calls > > aliases to mktime for time_t 32 and 64 bit (for Y2038 the proper > > __REDIRECT will be added). =20 >=20 > Sorry, I'm a bit lost here. How will that __REDIRECT work, exactly? > Should it be part of this patch, or part of a later patch? The __REDIRECT would be a part of the latter patch - the one which adds Y2038 support for 32 bit SoCs. It would simply redirect calls to mktime/timegm to internal __mktime64()/__timegm64(). >=20 > >> Come to think of it, user code shouldn't see __time64_t > >> either.... =20 > >=20 > > Is that the reason for removing __time64_t definition from > > posix/bits/types.h ? =20 >=20 > Yes. > > In the time/mktime-internal.h you added a comment regarding BeOS > > users and posix time_t - do you know any :-) ? =20 >=20 > Just one. :-) See: >=20 > https://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00470.html >=20 > Bruno's most recent BeOS-related submission to Gnulib was in October > 2017: >=20 > https://lists.gnu.org/r/bug-gnulib/2017-10/msg00098.html Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de --Sig_/0oPfmW=mOwxgp0e4bM=evze Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEgAyFJ+N6uu6+XupJAR8vZIA0zr0FAlyR5dYACgkQAR8vZIA0 zr0xiQf/VnJUnSiD/3slLxzmzb2ZACBteOzKsmS3RdJY7OV67SK1x1V49wbnW6jA +o8GaLiuK27gpRvsfI70FJYSYaG/WPMs/YiC1pJIzOC110EGQR4eqlFZebyBUyz+ twJa9TY6oNa8kbijCtWil/Nxgc8FyJMLE67jMRkZaIZCPXhek7qvPQ2NXu+s+q6s I+mFGvPhdlGOXiTcY0GbPtMa5i4n7H5VnwOs0hx0fRTtie8O1YCLH11OzeMQE7mZ EVrBmB8Zz7AmlVzDy7ltdhp6KGy3Z7/tL+SlpoTogaltoSqx0FkHIWh4iaVm4nB7 y2buU6stQEvuJCKbI3rwsESuIJRVUg== =MBBx -----END PGP SIGNATURE----- --Sig_/0oPfmW=mOwxgp0e4bM=evze--