Public bug reported:

```
$ podman run --rm -it ubuntu:26.10
$ apt update -y; apt upgrade -y
$ rm --version
rm (uutils coreutils) 0.10.0
$ gnumkdir -p $(yes a/ | head -n $((32 * 1024)) | tr -d '\n')
$ rm -rf a
Segmentation fault         (core dumped) rm -rf a
$ ls a
a
```

GNU coreutils handles this correctly:

```
$ gnurm -rf a
$ ls a
ls: cannot access 'a': No such file or directory
```

It is a bit premature to switch, when 'rm' can't handle all possible
directory entries, no?

Being able to remove all possible directory entries using 'rm' is
important enough for POSIX to explicitly require the behavior [1]:

> The rm utility shall be able to descend to arbitrary depths in a file
hierarchy, and shall not fail due to path length limitations (unless an
operand specified by the user exceeds system limitations).

[1] https://pubs.opengroup.org/onlinepubs/9799919799/utilities/rm.html

** Affects: rust-coreutils (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2167206

Title:
  rm segfaults due to recursive calls

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/rust-coreutils/+bug/2167206/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to