This is a clone of https://sourceware.org/bugzilla/show_bug.cgi?id=31212 Petre Rodan 2024-01-04 21:53:08 UTC Created attachment 15284 [details] 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
Created attachment 882813 [details] seekdir test copy of the test attached here as well