From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4E92D385E038; Thu, 4 Jan 2024 21:53:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4E92D385E038 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1704405190; bh=V4Slt+Wt+QBNKjLblgQQduzsJ6xDj4/ixdk6f4+KCMM=; h=From:To:Subject:Date:From; b=knJNKJ0F5T/gnTZAU6e4hLNi96aL2hqx22kYx9UwuheNGw/oolQ1G7+s/RzvP6CC1 af2jcCxtjG6+gf+rgqBzfmbdSK3Ak3hFhO7S9UnrFEVR3FjYda3KWZAIkJ/tMwIjcL lNqPGGYMBqY8+/68gv7lWSAcvTZj3yQy/rKM3FE4= From: "petre.rodan at subdimension dot ro" To: glibc-bugs@sourceware.org Subject: [Bug libc/31212] New: seekdir() unexected directory stream positioning on 32bit arm Date: Thu, 04 Jan 2024 21:53:08 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.37 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: petre.rodan at subdimension dot ro X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31212 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=3D15284&action=3Ded= it 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 ifd= ef 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-l= inux-Set-internal-DIR-filepos-as-off64_t-BZ-23960-B.patch --=20 You are receiving this mail because: You are on the CC list for the bug.=