[Bug 255589] strip(1) leaves empty file when applied to unstrippable file
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue May 4 10:24:24 UTC 2021
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255589
Bug ID: 255589
Summary: strip(1) leaves empty file when applied to
unstrippable file
Product: Base System
Version: 13.0-RELEASE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: bugs at FreeBSD.org
Reporter: adridg at freebsd.org
When strip(1) is applied to a file that it can't strip, it leaves behind an
empty file alongside the thing it was stripping.
To reproduce:
```
mkdir /tmp/example-for-strip
echo "bogus" > /tmp/example-for-strip/mytextfile
strip /tmp/example-for-strip/mytextfile
```
Output from strip is
```
strip: file format not recognized
```
The directory /tmp/example-for-strip now contains two files: the mytextfile --
that's intended -- and a 0-byte ecp.<random> file, which is not intended.
This affects ports builds where sometimes strip is applied to scripts -- that's
nominally a build-system problem for the port in question, but strip(1)
shouldn't be leaving spare files around anyway.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list