public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/31212] New: seekdir() unexected directory stream positioning on 32bit arm
@ 2024-01-04 21:53 petre.rodan at subdimension dot ro
  2024-01-05  8:33 ` [Bug libc/31212] " sam at gentoo dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: petre.rodan at subdimension dot ro @ 2024-01-04 21:53 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 31212
           Summary: seekdir() unexected directory stream positioning on
                    32bit arm
           Product: glibc
           Version: 2.37
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: petre.rodan at subdimension dot ro
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

Created attachment 15284
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15284&action=edit
seekdir test for armv7

hi there!

my stable branch Gentoo Linux comes with a 32-bit specific patch to glibc 2.37,
found here [1] - I guess the offending patch is the one that modifies
sysdeps/unix/sysv/linux/seekdir.c to add the _DIRENT_OFFSET_TRANSLATION ifdef
block.

I have attached a sample test which I run on my armv7. the output reads:

 ./main
 pre:           . .. clockevents platform w1 serio iio gpio event_source
mdio_bus soc cpu mmc scsi mmc_rpmb spi clocksource hid dp-aux usb serial
serial-base
cec sdio genpd nvmem gadget workqueue virtio container i2c mipi-dsi
 s0 location:  4294967295
 s0 entries:
 rew location: 1
 rew entries:   . .. clockevents platform w1 serio iio gpio event_source
mdio_bus soc cpu mmc scsi mmc_rpmb spi clocksource hid dp-aux usb serial
serial-base
cec sdio genpd nvmem gadget workqueue virtio container i2c mipi-dsi

as you can see, seekdir(dp, 0) leaves the location at an invalid -1 value
while rewinddir(dp) works correctly.
I guess that patch is already part of the glibc repo, so can you reproduce the
problem on an armv7?

running the test program on an amd64 Gentoo that contains the same patches
returns a perfect output.

thanks,
peter

[1]
https://gitweb.gentoo.org/proj/toolchain/glibc-patches.git/tree/9999/0005-linux-Set-internal-DIR-filepos-as-off64_t-BZ-23960-B.patch

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

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

* [Bug libc/31212] seekdir() unexected directory stream positioning on 32bit arm
  2024-01-04 21:53 [Bug libc/31212] New: seekdir() unexected directory stream positioning on 32bit arm petre.rodan at subdimension dot ro
@ 2024-01-05  8:33 ` sam at gentoo dot org
  2024-01-05  8:33 ` sam at gentoo dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: sam at gentoo dot org @ 2024-01-05  8:33 UTC (permalink / raw)
  To: glibc-bugs

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

Sam James <sam at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sam at gentoo dot org,
                   |                            |toolchain at gentoo dot org
           See Also|                            |https://sourceware.org/bugz
                   |                            |illa/show_bug.cgi?id=31186,
                   |                            |https://sourceware.org/bugz
                   |                            |illa/show_bug.cgi?id=23960,
                   |                            |https://sourceware.org/bugz
                   |                            |illa/show_bug.cgi?id=24050

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

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

* [Bug libc/31212] seekdir() unexected directory stream positioning on 32bit arm
  2024-01-04 21:53 [Bug libc/31212] New: seekdir() unexected directory stream positioning on 32bit arm petre.rodan at subdimension dot ro
  2024-01-05  8:33 ` [Bug libc/31212] " sam at gentoo dot org
@ 2024-01-05  8:33 ` sam at gentoo dot org
  2024-01-05  8:49 ` petre.rodan at subdimension dot ro
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: sam at gentoo dot org @ 2024-01-05  8:33 UTC (permalink / raw)
  To: glibc-bugs

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

Sam James <sam at gentoo dot org> changed:

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

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

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

* [Bug libc/31212] seekdir() unexected directory stream positioning on 32bit arm
  2024-01-04 21:53 [Bug libc/31212] New: seekdir() unexected directory stream positioning on 32bit arm petre.rodan at subdimension dot ro
  2024-01-05  8:33 ` [Bug libc/31212] " sam at gentoo dot org
  2024-01-05  8:33 ` sam at gentoo dot org
@ 2024-01-05  8:49 ` petre.rodan at subdimension dot ro
  2024-01-05 10:15 ` [Bug libc/31212] seekdir() unexpected " petre.rodan at subdimension dot ro
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: petre.rodan at subdimension dot ro @ 2024-01-05  8:49 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #1 from Petre Rodan <petre.rodan at subdimension dot ro> ---
Created attachment 15286
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15286&action=edit
output of emerge --info

for a bit of context, the bug started here

https://lkml.org/lkml/2024/1/4/281

and for the Gentoo toolchain devs I will attach the emerge --info and the glibc
USE flags

[ebuild   R    ] sys-libs/glibc-2.37-r7:2.2::gentoo  USE="caps gd multiarch ssp
static-libs -audit -cet -compile-locales -crypt -custom-cflags -doc
-hash-sysv-compat -headers-only -multilib -multilib-bootstrap -nscd -perl
-profile (-selinux) -stack-realign -suid -systemd -systemtap -test -vanilla"
18308 KiB

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

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

* [Bug libc/31212] seekdir() unexpected directory stream positioning on 32bit arm
  2024-01-04 21:53 [Bug libc/31212] New: seekdir() unexected directory stream positioning on 32bit arm petre.rodan at subdimension dot ro
                   ` (2 preceding siblings ...)
  2024-01-05  8:49 ` petre.rodan at subdimension dot ro
@ 2024-01-05 10:15 ` petre.rodan at subdimension dot ro
  2024-01-06  9:32 ` dilfridge at gentoo dot org
  2024-01-21 19:11 ` dilfridge at gentoo dot org
  5 siblings, 0 replies; 7+ messages in thread
From: petre.rodan at subdimension dot ro @ 2024-01-05 10:15 UTC (permalink / raw)
  To: glibc-bugs

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

Petre Rodan <petre.rodan at subdimension dot ro> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|seekdir() unexected         |seekdir() unexpected
                   |directory stream            |directory stream
                   |positioning on 32bit arm    |positioning on 32bit arm

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

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

* [Bug libc/31212] seekdir() unexpected directory stream positioning on 32bit arm
  2024-01-04 21:53 [Bug libc/31212] New: seekdir() unexected directory stream positioning on 32bit arm petre.rodan at subdimension dot ro
                   ` (3 preceding siblings ...)
  2024-01-05 10:15 ` [Bug libc/31212] seekdir() unexpected " petre.rodan at subdimension dot ro
@ 2024-01-06  9:32 ` dilfridge at gentoo dot org
  2024-01-21 19:11 ` dilfridge at gentoo dot org
  5 siblings, 0 replies; 7+ messages in thread
From: dilfridge at gentoo dot org @ 2024-01-06  9:32 UTC (permalink / raw)
  To: glibc-bugs

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

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

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

--- Comment #2 from Andreas K. Huettel <dilfridge at gentoo dot org> ---
These are non-standard patches that we carry in Gentoo, so it's not really
glibc's fault.

That said, it probably makes sense to track it here since the patches are a
workaround to a longstanding glibc problem.

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

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

* [Bug libc/31212] seekdir() unexpected directory stream positioning on 32bit arm
  2024-01-04 21:53 [Bug libc/31212] New: seekdir() unexected directory stream positioning on 32bit arm petre.rodan at subdimension dot ro
                   ` (4 preceding siblings ...)
  2024-01-06  9:32 ` dilfridge at gentoo dot org
@ 2024-01-21 19:11 ` dilfridge at gentoo dot org
  5 siblings, 0 replies; 7+ messages in thread
From: dilfridge at gentoo dot org @ 2024-01-21 19:11 UTC (permalink / raw)
  To: glibc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://bugs.gentoo.org/sho
                   |                            |w_bug.cgi?id=922642

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

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

end of thread, other threads:[~2024-01-21 19:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-04 21:53 [Bug libc/31212] New: seekdir() unexected directory stream positioning on 32bit arm petre.rodan at subdimension dot ro
2024-01-05  8:33 ` [Bug libc/31212] " sam at gentoo dot org
2024-01-05  8:33 ` sam at gentoo dot org
2024-01-05  8:49 ` petre.rodan at subdimension dot ro
2024-01-05 10:15 ` [Bug libc/31212] seekdir() unexpected " petre.rodan at subdimension dot ro
2024-01-06  9:32 ` dilfridge at gentoo dot org
2024-01-21 19:11 ` dilfridge at gentoo 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).