Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Luis Machado via Gdb-patches <gdb-patches@sourceware.org>
To: Paul Eggert <eggert@cs.ucla.edu>, Eli Zaretskii <eliz@gnu.org>,
	Simon Marchi <simark@simark.ca>
Cc: binutils@sourceware.org, gdb-patches@sourceware.org
Subject: Re: [PATCH] Disable year 2038 support on 32-bit hosts by default
Date: Mon, 8 Aug 2022 19:00:08 +0100	[thread overview]
Message-ID: <fd40b312-d45d-4cff-37c0-82bf63bc716c@arm.com> (raw)
In-Reply-To: <2958d426-aece-4597-1a6d-ec0981ebb1a6@cs.ucla.edu>

On 8/8/22 18:55, Paul Eggert wrote:
> On 8/1/22 23:42, Luis Machado wrote:
>>
>> Maybe the best course of action is to get autoconf patched to support year2038 checks and then use that
>> in binutils-gdb.
> 
> Sorry, I'm a bit lost here.
> 
> GDB can already do what Gnulib's largefile module does; that's just some .m4 code. It sounds like you don't want GDB to do that, and instead want Autoconf to do something - presumably, modify Autoconf's AC_SYS_LARGEFILE to do the same thing that Gnulib's AC_SYS_LARGEFILE does). Although Autoconf could do that, I don't see why that would be be any better for GDB than GDB's using the equivalent of Gnulib's largefile module in GDB's ACX_LARGEFILE macro.
> 
> What am I missing?

The missing part here is that although GDB can indeed use Gnulib's default "enable 64-bit time_t on 32-bit hosts" check, BFD doesn't use Gnulib and so won't know anything about 64-bit time_t. BFD uses autoconf's AC_SYS_LARGEFILE, which seems like a copy of Gnulib's AC_SYS_LARGEFILE, sort of.

Given there is some shared code between GDB and BFD using struct stat, for example, this leads to memory corruption due to the discrepancies in struct size.

  reply	other threads:[~2022-08-08 18:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-01  7:51 Luis Machado via Gdb-patches
2022-08-01 14:08 ` Simon Marchi via Gdb-patches
2022-08-01 14:17   ` Luis Machado via Gdb-patches
2022-08-01 15:37     ` Simon Marchi via Gdb-patches
2022-08-01 15:58       ` Eli Zaretskii via Gdb-patches
2022-08-02  6:42         ` Luis Machado via Gdb-patches
2022-08-08 11:34           ` Luis Machado via Gdb-patches
2022-08-08 11:58             ` Eli Zaretskii via Gdb-patches
2022-08-08 12:04               ` Luis Machado via Gdb-patches
2022-08-08 12:38                 ` Eli Zaretskii via Gdb-patches
2022-08-08 17:55           ` Paul Eggert
2022-08-08 18:00             ` Luis Machado via Gdb-patches [this message]
2022-08-08 18:01               ` Luis Machado via Gdb-patches
2022-08-09 15:49                 ` Paul Eggert
2022-08-09 15:59                   ` Luis Machado via Gdb-patches
2022-08-09 16:13                     ` Paul Eggert
2022-08-10  9:41                     ` Nick Clifton via Gdb-patches
2022-08-10 10:14                       ` Luis Machado via Gdb-patches
2022-08-09 16:29                   ` Eli Zaretskii via Gdb-patches
2022-08-09 17:02                     ` Paul Eggert
2022-08-10  8:38                       ` Alan Modra via Gdb-patches
2022-08-08 14:51 ` Nick Clifton via Gdb-patches

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=fd40b312-d45d-4cff-37c0-82bf63bc716c@arm.com \
    --to=gdb-patches@sourceware.org \
    --cc=binutils@sourceware.org \
    --cc=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --cc=luis.machado@arm.com \
    --cc=simark@simark.ca \
    /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