[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: find crashes when searching by inode number (-inum) on GNU/Hurd
From: |
Bernhard Voelker |
Subject: |
Re: find crashes when searching by inode number (-inum) on GNU/Hurd |
Date: |
Wed, 29 Dec 2021 20:42:18 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 |
On 12/22/21 09:34, Andrea Monaco wrote:
> Hello,
>
> when searching by inode number (-inum predicate) on my GNU/Hurd system,
> find crashes due to assertion "p->st_ino" in get_info failing.
>
> The same assertion is also done in pred.c at line 501. Inode numbers
> are often assumed to start from one, but apparently this is not mandated
> by POSIX and is not true on my system.
>
> Do that assertions protect against some type of errors? Otherwise we
> could remove them.
>
> Thanks,
> Andrea Monaco
Thanks for the bug report.
I managed to reproduce in a local GNU/Hurd VM on VirtualBox, see:
https://www.researchut.com/blog/debian-hurd-on-virtualbox/
Indeed, GNU/Hurd is using inode number Zero e.g. for /dev/console and /dev/tty.
The first patch fixes a side effect of '-D stat' on SELinux handling which
I found while reading adjacent code; pushed at:
https://git.sv.gnu.org/cgit/findutils.git/commit/?id=68979e578
The 2nd patch fixes the reported issue; pushed at:
https://git.sv.gnu.org/cgit/findutils.git/commit/?id=9290525c7
Have a nice day,
Berny
0001-find-avoid-D-stat-side-effect-on-SELinux-handling-wi.patch
Description: Text Data
0002-find-fix-visiting-of-files-with-inode-number-Zero.patch
Description: Text Data