Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: Pedro Alves <palves@redhat.com>
Cc: Eli Zaretskii <eliz@gnu.org>,  Tom Tromey <tom@tromey.com>,
	gdb-patches@sourceware.org,  tromey@adacore.com
Subject: Re: [PATCH 2/3] Consistently use BFD's time
Date: Thu, 18 Jun 2020 11:57:29 -0600	[thread overview]
Message-ID: <878sgk2r5i.fsf@tromey.com> (raw)
In-Reply-To: <ce74fefb-eabe-eda3-9b57-07d4963c87be@redhat.com> (Pedro Alves's message of "Thu, 18 Jun 2020 18:32:42 +0100")

Pedro> I disagree.  It's not only GDB's stat usage that counts, it's the
Pedro> other gnulib modules that depend on the stat module fixes too.  Also,
Pedro> that approach disables the stat module for all systems, not just
Pedro> mingw.  I think it's just bad policy to disable a module like that.

The reason I came to this conclusion is that the list of fixes doesn't
seem to include anything super important; while using it introduces bugs
that are difficult to work around, or even audit for.  In particular,
we'll have to be careful to never compare mtime-from-gnulib against
mtime-from-BFD.

Here's the list from the version of gnulib we're using.

   Portability problems fixed by Gnulib:
   * On platforms where 'off_t' is a 32-bit type, 'stat' may not
     correctly report the size of files or block devices larger than 2
     GB. (Cf.  'AC_SYS_LARGEFILE'.)
   * On Linux/x86 and Linux/x86_64, applications compiled in 32-bit mode
     cannot access files that happen to have a 64-bit inode number.
     This can occur with file systems such as XFS (typically on large
     disks) and NFS. (Cf.  'AC_SYS_LARGEFILE'.)
   * The 'st_atime', 'st_ctime', 'st_mtime' fields are affected by the
     current time zone and by the DST flag of the current time zone on
     some platforms: mingw, MSVC 14 (when the environment variable 'TZ'
     is set).
   * On MSVC 14, this function fails with error 'ENOENT' on files such
     as 'C:\pagefile.sys' and on directories such as 'C:\System Volume
     Information'.
   * On some platforms, 'stat("link-to-file/",buf)' succeeds instead of
     failing with 'ENOTDIR'.  FreeBSD 7.2, AIX 7.1, Solaris 9, mingw64.
   * On some platforms, 'stat(".",buf)' and 'stat("./",buf)' give
     different results: mingw, MSVC 14.
   * On Solaris 11.4, when this function yields a timestamp with a
     nonpositive 'tv_sec' value, 'tv_nsec' might be in the range
     -1000000000..-1, representing a negative nanoseconds offset from
     'tv_sec'.

I think the first one is probably not important to gdb; the second is
already working; and the third is a bug.  The rest just don't seem very
relevant.

Tom


  parent reply	other threads:[~2020-06-18 17:57 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-14 21:10 [PATCH 0/3] Fix gdb's BFD cache Tom Tromey
2020-01-14 21:10 ` [PATCH 1/3] Avoid hash table corruption in gdb_bfd.c Tom Tromey
2020-01-14 22:26   ` Christian Biesinger via gdb-patches
2020-01-14 21:10 ` [PATCH 2/3] Consistently use BFD's time Tom Tromey
2020-01-14 23:17   ` Christian Biesinger via gdb-patches
2020-01-15 17:51   ` Eli Zaretskii
2020-01-16 20:47     ` Pedro Alves
2020-01-16 21:58       ` Christian Biesinger via gdb-patches
2020-01-16 22:31         ` Pedro Alves
2020-01-17  8:48         ` Eli Zaretskii
2020-01-17 18:32           ` Tom Tromey
2020-01-17 21:03             ` Tom Tromey
2020-01-18 11:07               ` Eli Zaretskii
2020-01-20 15:52                 ` Pedro Alves
2020-01-20 15:53                   ` Pedro Alves
2020-01-20 20:50                   ` Eli Zaretskii
2020-01-20 20:58                     ` Pedro Alves
2020-01-21 15:50                       ` Pedro Alves
2020-01-21 19:38                         ` Eli Zaretskii
2020-01-21 17:56                       ` Eli Zaretskii
2020-01-23 22:05                   ` Tom Tromey
2020-06-19 17:51                   ` Tom Tromey
2020-04-01 20:20       ` Tom Tromey
2020-06-18 14:14     ` Tom Tromey
2020-06-18 15:04       ` Eli Zaretskii
2020-06-18 16:00         ` Tom Tromey
2020-06-18 17:27           ` Eli Zaretskii
2020-06-18 17:32             ` Pedro Alves
2020-06-18 17:54               ` Eli Zaretskii
2020-06-19 12:02                 ` Pedro Alves
2020-06-19 12:13                   ` Eli Zaretskii
2020-06-19 17:09                   ` Tom Tromey
2020-06-19 20:24                     ` Tom Tromey
2020-06-19 23:05                       ` Pedro Alves
2020-07-21 19:39                         ` Tom Tromey
2020-07-28 19:31                         ` Tom Tromey
2020-08-13 12:15                           ` Tom de Vries
2020-08-14 23:40                             ` Joel Brobecker
2020-08-23 16:09                               ` Joel Brobecker
2020-08-23 23:32                                 ` Pedro Alves
2020-08-24 20:04                                   ` Joel Brobecker
2020-09-02 14:45                                     ` Tom Tromey
2020-09-02 14:59                                       ` Joel Brobecker
2020-06-18 17:57               ` Tom Tromey [this message]
2020-01-14 22:13 ` [PATCH 3/3] Further simplify gdb BFD caching Tom Tromey
2020-01-23 22:30   ` Tom Tromey
2020-09-02 18:45     ` Tom Tromey

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=878sgk2r5i.fsf@tromey.com \
    --to=tromey@adacore.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=tom@tromey.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox