public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix disabling of year 2038 support on 32-bit hosts by default
@ 2024-02-03  3:14 Thiago Jung Bauermann
  2024-02-03 16:39 ` Thiago Jung Bauermann
  2024-02-05 14:59 ` Luis Machado
  0 siblings, 2 replies; 11+ messages in thread
From: Thiago Jung Bauermann @ 2024-02-03  3:14 UTC (permalink / raw)
  To: gdb-patches

Commit e5f2f7d901ee ("Disable year 2038 support on 32-bit hosts by
default") fixed a mismatch between 64-bit time_t in GDB and system headers
and 32-bit time_t in BFD.

However, since commit 862776f26a59 ("Finalized intl-update patches")
gnulib's year 2038 support has been accidentally re-enabled — causing
problems for 32-bit hosts again.  The commit split baseargs into
{h,b}baseargs, but this hasn't been done for the code that handles
--disable-year2038.

This patch restores the intended behaviour.  With this change, the number
of unexpected core files goes from 18 to 4.

Tested on armv8l-linux-gnueabihf.
---
 configure    | 3 ++-
 configure.ac | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 670684d83d15..6466b97f3ec0 100755
--- a/configure
+++ b/configure
@@ -10313,7 +10313,8 @@ hbaseargs="$hbaseargs --disable-option-checking"
 tbaseargs="$tbaseargs --disable-option-checking"
 
 if test "$enable_year2038" = no; then
-  baseargs="$baseargs --disable-year2038"
+  bbaseargs="$bbaseargs --disable-year2038"
+  hbaseargs="$hbaseargs --disable-year2038"
   tbaseargs="$tbaseargs --disable-year2038"
 fi
 
diff --git a/configure.ac b/configure.ac
index 88b4800e298f..1300a805fd8d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3432,7 +3432,8 @@ hbaseargs="$hbaseargs --disable-option-checking"
 tbaseargs="$tbaseargs --disable-option-checking"
 
 if test "$enable_year2038" = no; then
-  baseargs="$baseargs --disable-year2038"
+  bbaseargs="$bbaseargs --disable-year2038"
+  hbaseargs="$hbaseargs --disable-year2038"
   tbaseargs="$tbaseargs --disable-year2038"
 fi
 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] Fix disabling of year 2038 support on 32-bit hosts by default
  2024-02-03  3:14 [PATCH] Fix disabling of year 2038 support on 32-bit hosts by default Thiago Jung Bauermann
@ 2024-02-03 16:39 ` Thiago Jung Bauermann
  2024-02-06  8:26   ` Mark Wielaard
  2024-02-05 14:59 ` Luis Machado
  1 sibling, 1 reply; 11+ messages in thread
From: Thiago Jung Bauermann @ 2024-02-03 16:39 UTC (permalink / raw)
  To: binutils; +Cc: gdb-patches


Sorry, I forgot to cc: the binutils mailing list. Done now.

Thiago Jung Bauermann <thiago.bauermann@linaro.org> writes:

> Commit e5f2f7d901ee ("Disable year 2038 support on 32-bit hosts by
> default") fixed a mismatch between 64-bit time_t in GDB and system headers
> and 32-bit time_t in BFD.
>
> However, since commit 862776f26a59 ("Finalized intl-update patches")
> gnulib's year 2038 support has been accidentally re-enabled — causing
> problems for 32-bit hosts again.  The commit split baseargs into
> {h,b}baseargs, but this hasn't been done for the code that handles
> --disable-year2038.
>
> This patch restores the intended behaviour.  With this change, the number
> of unexpected core files goes from 18 to 4.
>
> Tested on armv8l-linux-gnueabihf.
> ---
>  configure    | 3 ++-
>  configure.ac | 3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/configure b/configure
> index 670684d83d15..6466b97f3ec0 100755
> --- a/configure
> +++ b/configure
> @@ -10313,7 +10313,8 @@ hbaseargs="$hbaseargs --disable-option-checking"
>  tbaseargs="$tbaseargs --disable-option-checking"
>  
>  if test "$enable_year2038" = no; then
> -  baseargs="$baseargs --disable-year2038"
> +  bbaseargs="$bbaseargs --disable-year2038"
> +  hbaseargs="$hbaseargs --disable-year2038"
>    tbaseargs="$tbaseargs --disable-year2038"
>  fi
>  
> diff --git a/configure.ac b/configure.ac
> index 88b4800e298f..1300a805fd8d 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -3432,7 +3432,8 @@ hbaseargs="$hbaseargs --disable-option-checking"
>  tbaseargs="$tbaseargs --disable-option-checking"
>  
>  if test "$enable_year2038" = no; then
> -  baseargs="$baseargs --disable-year2038"
> +  bbaseargs="$bbaseargs --disable-year2038"
> +  hbaseargs="$hbaseargs --disable-year2038"
>    tbaseargs="$tbaseargs --disable-year2038"
>  fi
>  


-- 
Thiago

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] Fix disabling of year 2038 support on 32-bit hosts by default
  2024-02-03  3:14 [PATCH] Fix disabling of year 2038 support on 32-bit hosts by default Thiago Jung Bauermann
  2024-02-03 16:39 ` Thiago Jung Bauermann
@ 2024-02-05 14:59 ` Luis Machado
  2024-02-05 17:25   ` Thiago Jung Bauermann
  2024-02-05 18:48   ` Thiago Jung Bauermann
  1 sibling, 2 replies; 11+ messages in thread
From: Luis Machado @ 2024-02-05 14:59 UTC (permalink / raw)
  To: Thiago Jung Bauermann, gdb-patches; +Cc: binutils

cc-ing binutils@ as well.

On 2/3/24 03:14, Thiago Jung Bauermann wrote:
> Commit e5f2f7d901ee ("Disable year 2038 support on 32-bit hosts by
> default") fixed a mismatch between 64-bit time_t in GDB and system headers
> and 32-bit time_t in BFD.
> 
> However, since commit 862776f26a59 ("Finalized intl-update patches")
> gnulib's year 2038 support has been accidentally re-enabled — causing
> problems for 32-bit hosts again.  The commit split baseargs into
> {h,b}baseargs, but this hasn't been done for the code that handles
> --disable-year2038.

Ouch. That's unfortunate. That was an annoying bug to chase. Thanks for chasing it (again).

> 
> This patch restores the intended behaviour.  With this change, the number
> of unexpected core files goes from 18 to 4.
> 
> Tested on armv8l-linux-gnueabihf.
> ---
>  configure    | 3 ++-
>  configure.ac | 3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/configure b/configure
> index 670684d83d15..6466b97f3ec0 100755
> --- a/configure
> +++ b/configure
> @@ -10313,7 +10313,8 @@ hbaseargs="$hbaseargs --disable-option-checking"
>  tbaseargs="$tbaseargs --disable-option-checking"
>  
>  if test "$enable_year2038" = no; then
> -  baseargs="$baseargs --disable-year2038"
> +  bbaseargs="$bbaseargs --disable-year2038"
> +  hbaseargs="$hbaseargs --disable-year2038"
>    tbaseargs="$tbaseargs --disable-year2038"
>  fi
>  
> diff --git a/configure.ac b/configure.ac
> index 88b4800e298f..1300a805fd8d 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -3432,7 +3432,8 @@ hbaseargs="$hbaseargs --disable-option-checking"
>  tbaseargs="$tbaseargs --disable-option-checking"
>  
>  if test "$enable_year2038" = no; then
> -  baseargs="$baseargs --disable-year2038"
> +  bbaseargs="$bbaseargs --disable-year2038"
> +  hbaseargs="$hbaseargs --disable-year2038"
>    tbaseargs="$tbaseargs --disable-year2038"
>  fi
>  

Approved-By: Luis Machado <luis.machado@arm.com>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] Fix disabling of year 2038 support on 32-bit hosts by default
  2024-02-05 14:59 ` Luis Machado
@ 2024-02-05 17:25   ` Thiago Jung Bauermann
  2024-02-05 18:39     ` Thiago Jung Bauermann
  2024-02-05 18:48   ` Thiago Jung Bauermann
  1 sibling, 1 reply; 11+ messages in thread
From: Thiago Jung Bauermann @ 2024-02-05 17:25 UTC (permalink / raw)
  To: Luis Machado; +Cc: gdb-patches, binutils


Hello Luis,

Luis Machado <luis.machado@arm.com> writes:

> cc-ing binutils@ as well.
>
> On 2/3/24 03:14, Thiago Jung Bauermann wrote:
>> Commit e5f2f7d901ee ("Disable year 2038 support on 32-bit hosts by
>> default") fixed a mismatch between 64-bit time_t in GDB and system headers
>> and 32-bit time_t in BFD.
>> 
>> However, since commit 862776f26a59 ("Finalized intl-update patches")
>> gnulib's year 2038 support has been accidentally re-enabled — causing
>> problems for 32-bit hosts again.  The commit split baseargs into
>> {h,b}baseargs, but this hasn't been done for the code that handles
>> --disable-year2038.
>
> Ouch. That's unfortunate. That was an annoying bug to chase. Thanks for chasing it
> (again).

No problem. It was much easier the second time around, of course.

>> This patch restores the intended behaviour.  With this change, the number
>> of unexpected core files goes from 18 to 4.
>> 
>> Tested on armv8l-linux-gnueabihf.
>> ---
>>  configure    | 3 ++-
>>  configure.ac | 3 ++-
>>  2 files changed, 4 insertions(+), 2 deletions(-)
>> 
>> diff --git a/configure b/configure
>> index 670684d83d15..6466b97f3ec0 100755
>> --- a/configure
>> +++ b/configure
>> @@ -10313,7 +10313,8 @@ hbaseargs="$hbaseargs --disable-option-checking"
>>  tbaseargs="$tbaseargs --disable-option-checking"
>>  
>>  if test "$enable_year2038" = no; then
>> -  baseargs="$baseargs --disable-year2038"
>> +  bbaseargs="$bbaseargs --disable-year2038"
>> +  hbaseargs="$hbaseargs --disable-year2038"
>>    tbaseargs="$tbaseargs --disable-year2038"
>>  fi
>>  
>> diff --git a/configure.ac b/configure.ac
>> index 88b4800e298f..1300a805fd8d 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -3432,7 +3432,8 @@ hbaseargs="$hbaseargs --disable-option-checking"
>>  tbaseargs="$tbaseargs --disable-option-checking"
>>  
>>  if test "$enable_year2038" = no; then
>> -  baseargs="$baseargs --disable-year2038"
>> +  bbaseargs="$bbaseargs --disable-year2038"
>> +  hbaseargs="$hbaseargs --disable-year2038"
>>    tbaseargs="$tbaseargs --disable-year2038"
>>  fi
>>  
>
> Approved-By: Luis Machado <luis.machado@arm.com>

Thanks! Since this is a patch for the repository top-level, is your
approval sufficient to commit the patch, or should I have approval from
a binutils maintainer as well?

-- 
Thiago

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] Fix disabling of year 2038 support on 32-bit hosts by default
  2024-02-05 17:25   ` Thiago Jung Bauermann
@ 2024-02-05 18:39     ` Thiago Jung Bauermann
  2024-02-05 18:57       ` Andrew Pinski
  0 siblings, 1 reply; 11+ messages in thread
From: Thiago Jung Bauermann @ 2024-02-05 18:39 UTC (permalink / raw)
  To: Luis Machado, gdb-patches, binutils


Thiago Jung Bauermann <thiago.bauermann@linaro.org> writes:

> Hello Luis,
>
> Luis Machado <luis.machado@arm.com> writes:
>>
>> Approved-By: Luis Machado <luis.machado@arm.com>
>
> Thanks! Since this is a patch for the repository top-level, is your
> approval sufficient to commit the patch, or should I have approval from
> a binutils maintainer as well?

Answering my own question: binutils/MAINTAINERS says:

  GDB global maintainers also have permission to commit and approve
  patches to the top level files and to those parts of bfd files
  primarily used by GDB.

So pushed as commit 9c0aa4c53104.

-- 
Thiago

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] Fix disabling of year 2038 support on 32-bit hosts by default
  2024-02-05 14:59 ` Luis Machado
  2024-02-05 17:25   ` Thiago Jung Bauermann
@ 2024-02-05 18:48   ` Thiago Jung Bauermann
  2024-02-05 20:24     ` Tom Tromey
  1 sibling, 1 reply; 11+ messages in thread
From: Thiago Jung Bauermann @ 2024-02-05 18:48 UTC (permalink / raw)
  To: Luis Machado; +Cc: gdb-patches


Luis Machado <luis.machado@arm.com> writes:

> On 2/3/24 03:14, Thiago Jung Bauermann wrote:
>> diff --git a/configure b/configure
>> index 670684d83d15..6466b97f3ec0 100755
>> --- a/configure
>> +++ b/configure
>> @@ -10313,7 +10313,8 @@ hbaseargs="$hbaseargs --disable-option-checking"
>>  tbaseargs="$tbaseargs --disable-option-checking"
>>  
>>  if test "$enable_year2038" = no; then
>> -  baseargs="$baseargs --disable-year2038"
>> +  bbaseargs="$bbaseargs --disable-year2038"
>> +  hbaseargs="$hbaseargs --disable-year2038"
>>    tbaseargs="$tbaseargs --disable-year2038"
>>  fi
>>  
>> diff --git a/configure.ac b/configure.ac
>> index 88b4800e298f..1300a805fd8d 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -3432,7 +3432,8 @@ hbaseargs="$hbaseargs --disable-option-checking"
>>  tbaseargs="$tbaseargs --disable-option-checking"
>>  
>>  if test "$enable_year2038" = no; then
>> -  baseargs="$baseargs --disable-year2038"
>> +  bbaseargs="$bbaseargs --disable-year2038"
>> +  hbaseargs="$hbaseargs --disable-year2038"
>>    tbaseargs="$tbaseargs --disable-year2038"
>>  fi
>>  
>
> Approved-By: Luis Machado <luis.machado@arm.com>

I forgot to ask: is it ok to commit this patch to the GDB 14 branch as well?

-- 
Thiago

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] Fix disabling of year 2038 support on 32-bit hosts by default
  2024-02-05 18:39     ` Thiago Jung Bauermann
@ 2024-02-05 18:57       ` Andrew Pinski
  2024-02-06 20:57         ` Thiago Jung Bauermann
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Pinski @ 2024-02-05 18:57 UTC (permalink / raw)
  To: Thiago Jung Bauermann; +Cc: Luis Machado, gdb-patches, binutils, GCC Patches

On Mon, Feb 5, 2024 at 10:40 AM Thiago Jung Bauermann
<thiago.bauermann@linaro.org> wrote:
>
>
> Thiago Jung Bauermann <thiago.bauermann@linaro.org> writes:
>
> > Hello Luis,
> >
> > Luis Machado <luis.machado@arm.com> writes:
> >>
> >> Approved-By: Luis Machado <luis.machado@arm.com>
> >
> > Thanks! Since this is a patch for the repository top-level, is your
> > approval sufficient to commit the patch, or should I have approval from
> > a binutils maintainer as well?
>
> Answering my own question: binutils/MAINTAINERS says:
>
>   GDB global maintainers also have permission to commit and approve
>   patches to the top level files and to those parts of bfd files
>   primarily used by GDB.
>
> So pushed as commit 9c0aa4c53104.


Please also submit/commit to the gcc trunk too since the toplevel
configure should be insync between the 2 repos.

Thanks,
Andrew

>
> --
> Thiago

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] Fix disabling of year 2038 support on 32-bit hosts by default
  2024-02-05 18:48   ` Thiago Jung Bauermann
@ 2024-02-05 20:24     ` Tom Tromey
  2024-02-06 21:39       ` Thiago Jung Bauermann
  0 siblings, 1 reply; 11+ messages in thread
From: Tom Tromey @ 2024-02-05 20:24 UTC (permalink / raw)
  To: Thiago Jung Bauermann; +Cc: Luis Machado, gdb-patches

>>>>> "Thiago" == Thiago Jung Bauermann <thiago.bauermann@linaro.org> writes:

>> Approved-By: Luis Machado <luis.machado@arm.com>

Thiago> I forgot to ask: is it ok to commit this patch to the GDB 14 branch as well?

Sure.  Thank you.

Tom

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] Fix disabling of year 2038 support on 32-bit hosts by default
  2024-02-03 16:39 ` Thiago Jung Bauermann
@ 2024-02-06  8:26   ` Mark Wielaard
  0 siblings, 0 replies; 11+ messages in thread
From: Mark Wielaard @ 2024-02-06  8:26 UTC (permalink / raw)
  To: Thiago Jung Bauermann; +Cc: binutils, gdb-patches

Hi Thiago,

On Sat, Feb 03, 2024 at 01:39:15PM -0300, Thiago Jung Bauermann wrote:
> Thiago Jung Bauermann <thiago.bauermann@linaro.org> writes:
> 
> > Commit e5f2f7d901ee ("Disable year 2038 support on 32-bit hosts by
> > default") fixed a mismatch between 64-bit time_t in GDB and system headers
> > and 32-bit time_t in BFD.
> >
> > However, since commit 862776f26a59 ("Finalized intl-update patches")
> > gnulib's year 2038 support has been accidentally re-enabled — causing
> > problems for 32-bit hosts again.  The commit split baseargs into
> > {h,b}baseargs, but this hasn't been done for the code that handles
> > --disable-year2038.
> >
> > This patch restores the intended behaviour.  With this change, the number
> > of unexpected core files goes from 18 to 4.
> >
> > Tested on armv8l-linux-gnueabihf.

Thanks, this was also why the debian-i386-gdb builder was failing,
which is fixed with this patch! I had been scratching my head for some
time where this failure was coming from (it started when upgrading
debian).

https://builder.sourceware.org/buildbot/#/builders/105/builds/5890

Cheers,

Mark

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] Fix disabling of year 2038 support on 32-bit hosts by default
  2024-02-05 18:57       ` Andrew Pinski
@ 2024-02-06 20:57         ` Thiago Jung Bauermann
  0 siblings, 0 replies; 11+ messages in thread
From: Thiago Jung Bauermann @ 2024-02-06 20:57 UTC (permalink / raw)
  To: Andrew Pinski; +Cc: Luis Machado, gdb-patches, binutils, GCC Patches


Hello Andrew,

Andrew Pinski <pinskia@gmail.com> writes:

> On Mon, Feb 5, 2024 at 10:40 AM Thiago Jung Bauermann
> <thiago.bauermann@linaro.org> wrote:
>>
>>
>> Thiago Jung Bauermann <thiago.bauermann@linaro.org> writes:
>>
>> > Hello Luis,
>> >
>> > Luis Machado <luis.machado@arm.com> writes:
>> >>
>> >> Approved-By: Luis Machado <luis.machado@arm.com>
>> >
>> > Thanks! Since this is a patch for the repository top-level, is your
>> > approval sufficient to commit the patch, or should I have approval from
>> > a binutils maintainer as well?
>>
>> Answering my own question: binutils/MAINTAINERS says:
>>
>>   GDB global maintainers also have permission to commit and approve
>>   patches to the top level files and to those parts of bfd files
>>   primarily used by GDB.
>>
>> So pushed as commit 9c0aa4c53104.
>
> Please also submit/commit to the gcc trunk too since the toplevel
> configure should be insync between the 2 repos.

I don't have commit access to the gcc repo so I sent a patch to the
gcc-patches mailing list.

-- 
Thiago

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] Fix disabling of year 2038 support on 32-bit hosts by default
  2024-02-05 20:24     ` Tom Tromey
@ 2024-02-06 21:39       ` Thiago Jung Bauermann
  0 siblings, 0 replies; 11+ messages in thread
From: Thiago Jung Bauermann @ 2024-02-06 21:39 UTC (permalink / raw)
  To: Tom Tromey; +Cc: Luis Machado, gdb-patches


Tom Tromey <tom@tromey.com> writes:

>>>>>> "Thiago" == Thiago Jung Bauermann <thiago.bauermann@linaro.org> writes:
>
>>> Approved-By: Luis Machado <luis.machado@arm.com>
>
> Thiago> I forgot to ask: is it ok to commit this patch to the GDB 14 branch as well?
>
> Sure.  Thank you.

Actually, it turns out that gdb-14-branch was created before the
problem was introduced, so this patch isn't needed in the branch.

-- 
Thiago

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-02-06 21:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-03  3:14 [PATCH] Fix disabling of year 2038 support on 32-bit hosts by default Thiago Jung Bauermann
2024-02-03 16:39 ` Thiago Jung Bauermann
2024-02-06  8:26   ` Mark Wielaard
2024-02-05 14:59 ` Luis Machado
2024-02-05 17:25   ` Thiago Jung Bauermann
2024-02-05 18:39     ` Thiago Jung Bauermann
2024-02-05 18:57       ` Andrew Pinski
2024-02-06 20:57         ` Thiago Jung Bauermann
2024-02-05 18:48   ` Thiago Jung Bauermann
2024-02-05 20:24     ` Tom Tromey
2024-02-06 21:39       ` Thiago Jung Bauermann

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 read-only IMAP folder(s) and NNTP newsgroup(s).