From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CEAE63858423; Mon, 6 Mar 2023 12:15:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CEAE63858423 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1678104934; bh=uIyL4vMyVL3ql0AhsQ2G0pVfj0zVP1KrBIyq3nz/jZI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=IggGK8k6QCypBHN8FMuKswlmY6SMgxl12YBxaM3kOvi+NyoO5U0bz+VfEeVQ/dMG0 u5/0beCp3wtZAfuYG203H7oAHKGL4jiTE53sJ7cKqWdtKpPTYW24kcLbwelKbRkpcn su4lM+Jf7pM1S7G0+vY2CGq+2pY73P+iCNUMJtqs= From: "adhemerval.zanella at linaro dot org" To: glibc-bugs@sourceware.org Subject: [Bug time/30200] time sometimes appears to go backwards Date: Mon, 06 Mar 2023 12:15:33 +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.35 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: adhemerval.zanella at linaro dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D30200 Adhemerval Zanella changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |adhemerval.zanella at lina= ro dot o | |rg --- Comment #6 from Adhemerval Zanella --- (In reply to Bruno Haible from comment #5) > For comparison, the test program succeeds (even 100000 consecutive runs) = on > - musl libc (Alpine Linux 3.17) > - FreeBSD 13.1 > - NetBSD 9.0 > - OpenBSD 7.2 > - macOS 12.5 > - Solaris 11.4 > - GNU/Hurd If I recall correctly, we used CLOCK_REALTIME_COARSE for time to mimic Linux time syscall kernel behavior (which is implemented in a couple of old ABI a= nd used historically). Recently on 64 time_t time, we changed time to use clock_gettime and kept the same clock for compatibility. I agree that it makes sense to use the same clock for time and timespec_get, however, using CLOCK_REALTIME would make the vDSO optimization for x86_64 a= nd powerpc64 unusable (not a big deal IMHO). And another question is whether we will need to add a compact symbol to time (and I also do not think it would make sense either). --=20 You are receiving this mail because: You are on the CC list for the bug.=