public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/29069] New: fstatat64_time64_statx wrapper broken on MIPS N32 with -D_FILE_OFFSET_BITS=64 and -D_TIME_BITS=64
@ 2022-04-16 22:35 kumba at gentoo dot org
  2022-04-16 22:38 ` [Bug libc/29069] " kumba at gentoo dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: kumba at gentoo dot org @ 2022-04-16 22:35 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29069

            Bug ID: 29069
           Summary: fstatat64_time64_statx wrapper broken on MIPS N32 with
                    -D_FILE_OFFSET_BITS=64 and -D_TIME_BITS=64
           Product: glibc
           Version: 2.35
            Status: NEW
          Keywords: glibc_2.35
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: kumba at gentoo dot org
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---
              Host: mips64-unknown-linux-gnu
            Target: mips64-unknown-linux-gnu
             Build: mips64-unknown-linux-gnu

In glibc-2.35, BZ#15333 was resolved by adding -D_TIME_BITS=64 to the build. 
Under a MIPS N32 ABI, this breaks the fstatat64_time64_statx wrapper, which
causes localedef to fail, breaking locale generation.  The cause appears to be
missing ifdef __USE_TIME_BITS64 hunks that were applied to the _MIPS_SIM ==
_ABIO32 sections of `struct stat` and `struct stat64` blocks in
<bits/struct_stat.h>.

A testcase program is attached that can be compiled under an N32 userland to
demonstrate the failure.  The problem does not manifest itself under an O32
userland or as an N64 binary in a multilib userland (I don't have a pure N64
userland to test with).

For a fix, I applied the same changes from the _MIPS_SIM == _ABIO32 case to the
stat/stat64 structs for N32, and the testcase indicates that this fixes the
problem.  But I am not confident that that is the proper way to fix it.  A
patch for this is attached in case it happens to be correct.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug libc/29069] fstatat64_time64_statx wrapper broken on MIPS N32 with -D_FILE_OFFSET_BITS=64 and -D_TIME_BITS=64
  2022-04-16 22:35 [Bug libc/29069] New: fstatat64_time64_statx wrapper broken on MIPS N32 with -D_FILE_OFFSET_BITS=64 and -D_TIME_BITS=64 kumba at gentoo dot org
@ 2022-04-16 22:38 ` kumba at gentoo dot org
  2022-04-16 22:42 ` kumba at gentoo dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: kumba at gentoo dot org @ 2022-04-16 22:38 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29069

--- Comment #1 from Joshua Kinard <kumba at gentoo dot org> ---
Created attachment 14065
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14065&action=edit
Testcase for BZ#29069

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug libc/29069] fstatat64_time64_statx wrapper broken on MIPS N32 with -D_FILE_OFFSET_BITS=64 and -D_TIME_BITS=64
  2022-04-16 22:35 [Bug libc/29069] New: fstatat64_time64_statx wrapper broken on MIPS N32 with -D_FILE_OFFSET_BITS=64 and -D_TIME_BITS=64 kumba at gentoo dot org
  2022-04-16 22:38 ` [Bug libc/29069] " kumba at gentoo dot org
@ 2022-04-16 22:42 ` kumba at gentoo dot org
  2022-04-16 22:44 ` kumba at gentoo dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: kumba at gentoo dot org @ 2022-04-16 22:42 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29069

--- Comment #2 from Joshua Kinard <kumba at gentoo dot org> ---
Created attachment 14066
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14066&action=edit
Possible fix for BZ#29069

Patch that may fix the issue highlighted by this bug by adding the missing
chunk to the N32 versions of `struct stat` and `struct stat64` in
<bits/struct_stat.h>:

# ifdef __USE_TIME_BITS64
#  include <bits/struct_stat_time64_helper.h>
# else
...
# endif /* __USE_TIME_BITS64  */

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug libc/29069] fstatat64_time64_statx wrapper broken on MIPS N32 with -D_FILE_OFFSET_BITS=64 and -D_TIME_BITS=64
  2022-04-16 22:35 [Bug libc/29069] New: fstatat64_time64_statx wrapper broken on MIPS N32 with -D_FILE_OFFSET_BITS=64 and -D_TIME_BITS=64 kumba at gentoo dot org
  2022-04-16 22:38 ` [Bug libc/29069] " kumba at gentoo dot org
  2022-04-16 22:42 ` kumba at gentoo dot org
@ 2022-04-16 22:44 ` kumba at gentoo dot org
  2022-04-17 16:56 ` dilfridge at gentoo dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: kumba at gentoo dot org @ 2022-04-16 22:44 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29069

Joshua Kinard <kumba at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |toolchain at gentoo dot org

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug libc/29069] fstatat64_time64_statx wrapper broken on MIPS N32 with -D_FILE_OFFSET_BITS=64 and -D_TIME_BITS=64
  2022-04-16 22:35 [Bug libc/29069] New: fstatat64_time64_statx wrapper broken on MIPS N32 with -D_FILE_OFFSET_BITS=64 and -D_TIME_BITS=64 kumba at gentoo dot org
                   ` (2 preceding siblings ...)
  2022-04-16 22:44 ` kumba at gentoo dot org
@ 2022-04-17 16:56 ` dilfridge at gentoo dot org
  2022-04-17 18:10 ` kumba at gentoo dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dilfridge at gentoo dot org @ 2022-04-17 16:56 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29069

Andreas K. Huettel <dilfridge at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dilfridge at gentoo dot org,
                   |                            |jsm28 at gcc dot gnu.org

--- Comment #3 from Andreas K. Huettel <dilfridge at gentoo dot org> ---
Note that the patch is actually for

sysdeps/unix/sysv/linux/mips/bits/struct_stat.h

[also cc'ing mips maintainer]

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug libc/29069] fstatat64_time64_statx wrapper broken on MIPS N32 with -D_FILE_OFFSET_BITS=64 and -D_TIME_BITS=64
  2022-04-16 22:35 [Bug libc/29069] New: fstatat64_time64_statx wrapper broken on MIPS N32 with -D_FILE_OFFSET_BITS=64 and -D_TIME_BITS=64 kumba at gentoo dot org
                   ` (3 preceding siblings ...)
  2022-04-17 16:56 ` dilfridge at gentoo dot org
@ 2022-04-17 18:10 ` kumba at gentoo dot org
  2022-04-18 12:55 ` adhemerval.zanella at linaro dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: kumba at gentoo dot org @ 2022-04-17 18:10 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29069

Joshua Kinard <kumba at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #14066|0                           |1
        is obsolete|                            |

--- Comment #4 from Joshua Kinard <kumba at gentoo dot org> ---
Created attachment 14068
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14068&action=edit
Possible fix for BZ#29069 v2

Generate the patch from git to fix the file paths

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug libc/29069] fstatat64_time64_statx wrapper broken on MIPS N32 with -D_FILE_OFFSET_BITS=64 and -D_TIME_BITS=64
  2022-04-16 22:35 [Bug libc/29069] New: fstatat64_time64_statx wrapper broken on MIPS N32 with -D_FILE_OFFSET_BITS=64 and -D_TIME_BITS=64 kumba at gentoo dot org
                   ` (4 preceding siblings ...)
  2022-04-17 18:10 ` kumba at gentoo dot org
@ 2022-04-18 12:55 ` adhemerval.zanella at linaro dot org
  2022-04-18 12:55 ` adhemerval.zanella at linaro dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2022-04-18 12:55 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29069

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |adhemerval.zanella at linaro dot o
                   |                            |rg

--- Comment #5 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
The fix looks ok, but it also means that mips64n32 is broken for 64-bit time_t
since 2.33. I don't have a setup to test it (gcc build farm mips64-le machine
only has a 4.1 kernel, so the 64-bit tests are not supported it).

I will commit this and backport to old releases.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug libc/29069] fstatat64_time64_statx wrapper broken on MIPS N32 with -D_FILE_OFFSET_BITS=64 and -D_TIME_BITS=64
  2022-04-16 22:35 [Bug libc/29069] New: fstatat64_time64_statx wrapper broken on MIPS N32 with -D_FILE_OFFSET_BITS=64 and -D_TIME_BITS=64 kumba at gentoo dot org
                   ` (5 preceding siblings ...)
  2022-04-18 12:55 ` adhemerval.zanella at linaro dot org
@ 2022-04-18 12:55 ` adhemerval.zanella at linaro dot org
  2022-04-18 12:58 ` adhemerval.zanella at linaro dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2022-04-18 12:55 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29069

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|2.35                        |2.33

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug libc/29069] fstatat64_time64_statx wrapper broken on MIPS N32 with -D_FILE_OFFSET_BITS=64 and -D_TIME_BITS=64
  2022-04-16 22:35 [Bug libc/29069] New: fstatat64_time64_statx wrapper broken on MIPS N32 with -D_FILE_OFFSET_BITS=64 and -D_TIME_BITS=64 kumba at gentoo dot org
                   ` (6 preceding siblings ...)
  2022-04-18 12:55 ` adhemerval.zanella at linaro dot org
@ 2022-04-18 12:58 ` adhemerval.zanella at linaro dot org
  2022-04-18 12:58 ` adhemerval.zanella at linaro dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2022-04-18 12:58 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29069

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|2.33                        |2.34

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug libc/29069] fstatat64_time64_statx wrapper broken on MIPS N32 with -D_FILE_OFFSET_BITS=64 and -D_TIME_BITS=64
  2022-04-16 22:35 [Bug libc/29069] New: fstatat64_time64_statx wrapper broken on MIPS N32 with -D_FILE_OFFSET_BITS=64 and -D_TIME_BITS=64 kumba at gentoo dot org
                   ` (7 preceding siblings ...)
  2022-04-18 12:58 ` adhemerval.zanella at linaro dot org
@ 2022-04-18 12:58 ` adhemerval.zanella at linaro dot org
  2022-04-18 16:12 ` adhemerval.zanella at linaro dot org
  2022-04-18 19:50 ` adhemerval.zanella at linaro dot org
  10 siblings, 0 replies; 12+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2022-04-18 12:58 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29069

--- Comment #6 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
(In reply to Adhemerval Zanella from comment #5)
> The fix looks ok, but it also means that mips64n32 is broken for 64-bit
> time_t since 2.33. I don't have a setup to test it (gcc build farm mips64-le
> machine only has a 4.1 kernel, so the 64-bit tests are not supported it).
> 
> I will commit this and backport to old releases.

I meant 2.34, since it was the first version to support 64 bit time_t on ABI
with 32 bit default time_t.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug libc/29069] fstatat64_time64_statx wrapper broken on MIPS N32 with -D_FILE_OFFSET_BITS=64 and -D_TIME_BITS=64
  2022-04-16 22:35 [Bug libc/29069] New: fstatat64_time64_statx wrapper broken on MIPS N32 with -D_FILE_OFFSET_BITS=64 and -D_TIME_BITS=64 kumba at gentoo dot org
                   ` (8 preceding siblings ...)
  2022-04-18 12:58 ` adhemerval.zanella at linaro dot org
@ 2022-04-18 16:12 ` adhemerval.zanella at linaro dot org
  2022-04-18 19:50 ` adhemerval.zanella at linaro dot org
  10 siblings, 0 replies; 12+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2022-04-18 16:12 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29069

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
   Target Milestone|---                         |2.36
         Resolution|---                         |FIXED

--- Comment #7 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
Fixed on 2.36.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug libc/29069] fstatat64_time64_statx wrapper broken on MIPS N32 with -D_FILE_OFFSET_BITS=64 and -D_TIME_BITS=64
  2022-04-16 22:35 [Bug libc/29069] New: fstatat64_time64_statx wrapper broken on MIPS N32 with -D_FILE_OFFSET_BITS=64 and -D_TIME_BITS=64 kumba at gentoo dot org
                   ` (9 preceding siblings ...)
  2022-04-18 16:12 ` adhemerval.zanella at linaro dot org
@ 2022-04-18 19:50 ` adhemerval.zanella at linaro dot org
  10 siblings, 0 replies; 12+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2022-04-18 19:50 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29069

--- Comment #8 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
I also backported to 2.34 and 2.35.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

end of thread, other threads:[~2022-04-18 19:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-16 22:35 [Bug libc/29069] New: fstatat64_time64_statx wrapper broken on MIPS N32 with -D_FILE_OFFSET_BITS=64 and -D_TIME_BITS=64 kumba at gentoo dot org
2022-04-16 22:38 ` [Bug libc/29069] " kumba at gentoo dot org
2022-04-16 22:42 ` kumba at gentoo dot org
2022-04-16 22:44 ` kumba at gentoo dot org
2022-04-17 16:56 ` dilfridge at gentoo dot org
2022-04-17 18:10 ` kumba at gentoo dot org
2022-04-18 12:55 ` adhemerval.zanella at linaro dot org
2022-04-18 12:55 ` adhemerval.zanella at linaro dot org
2022-04-18 12:58 ` adhemerval.zanella at linaro dot org
2022-04-18 12:58 ` adhemerval.zanella at linaro dot org
2022-04-18 16:12 ` adhemerval.zanella at linaro dot org
2022-04-18 19:50 ` adhemerval.zanella at linaro dot org

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).