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

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