From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AE9CA384AB47; Fri, 3 May 2024 07:29:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AE9CA384AB47 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1714721391; bh=U7STe3QHUl2+wLY2ZOia8w3gGSl3WxQIOp+P1f8y5jE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Tmk6IRNulPTl1XU9BxRqblfrBsIxsC/pq2QWAHwh0QTjx8zjKIqRfNq/RHJZ6jy2C HJSXO9hBqmRws6YZDdK8Vku4KVDT59+RiqnmMLvAfV+ppbzHZhZ+T5VJi/szpgYSFC 6rXg+q/Ii/dWeCZeXb1r/b4uNXZzr8kDRRv31Oog= From: "fweimer at redhat dot com" To: glibc-bugs@sourceware.org Subject: [Bug time/30701] getutxent misbehaves on 32-bit x86 when _TIME_BITS=64 Date: Fri, 03 May 2024 07:29:51 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: time X-Bugzilla-Version: 2.37 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fweimer at redhat dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: fweimer at redhat dot com X-Bugzilla-Target-Milestone: 2.40 X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30701 --- Comment #7 from Florian Weimer --- (In reply to Bruno Haible from comment #4) > While doing this conversion, the code could interpret the 'tv_sec' field = as > an 'unsigned int' (as opposed to an 'int'). This would solve the year 2038 > problem at this place. Suggested by Andreas Schwab in > https://sourceware.org/pipermail/libc-alpha/2023-August/150661.html . This has been implemented in glibc 2.40 via: commit 5361ad3910c257bc327567be76fde532ed238e42 Author: Florian Weimer Date: Fri Apr 19 14:38:17 2024 +0200 login: Use unsigned 32-bit types for seconds-since-epoch These fields store timestamps when the system was running. No Linux systems existed before 1970, so these values are unused. Switching to unsigned types allows continued use of the existing struct layouts beyond the year 2038. The intent is to give distributions more time to switch to improved interfaces that also avoid locking/data corruption issues. Reviewed-by: Adhemerval Zanella No backports planned. --=20 You are receiving this mail because: You are on the CC list for the bug.=