mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Zev Levy Stevenson <zevlevys@gmail.com>
To: musl@lists.openwall.com
Subject: [musl] Question about musl's time() implementation in time.c
Date: Tue, 7 Jun 2022 15:25:13 +0300	[thread overview]
Message-ID: <CAFJhRnoEifeo0Tr2qfKD031C=9jYZ7oP3zSR9hFUmFp86Og7+Q@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 723 bytes --]

Hi all,

While running the libc-test test suite on a customized clang+musl build, I
had trouble with some of the tests because of issues with time accuracy.
I can go in detail if needed, but the problem seemed to boil down to the
time() function in musl (in src/time/time.c) using a clock_gettime syscall
(without vdso) instead of using the Linux time syscall that we expected it
to use. Some other libc implementations use this syscall, and indeed after
switching the syscall used in time () the tests passed, seemingly because
the accuracy of the clocks used matched up.
My main question is why musl's implementation doesn't use the time syscall,
I'd be happy to hear if there was a special reason for this.

Thanks, Zev

[-- Attachment #2: Type: text/html, Size: 918 bytes --]

             reply	other threads:[~2022-06-07 12:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-07 12:25 Zev Levy Stevenson [this message]
2022-06-07 14:29 ` Arnd Bergmann
2022-06-07 16:30   ` Rich Felker
2022-06-10  8:52     ` Zev Levy Stevenson
2022-06-14 16:50       ` Arnd Bergmann
2022-06-14 17:00         ` Rich Felker
2022-06-14 20:37           ` Arnd Bergmann
2022-06-14 20:49             ` Rich Felker
2022-06-14 21:11               ` Arnd Bergmann
2022-06-14 23:28                 ` Rich Felker
2022-06-15 12:09                   ` Arnd Bergmann
2022-06-15 16:55                     ` Adhemerval Zanella
2022-06-16  9:06                     ` Thomas Gleixner
2022-06-16 14:57       ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFJhRnoEifeo0Tr2qfKD031C=9jYZ7oP3zSR9hFUmFp86Og7+Q@mail.gmail.com' \
    --to=zevlevys@gmail.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).