Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 04 May 2021 10:24:24 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 255589] strip(1) leaves empty file when applied to unstrippable file
Message-ID:  <bug-255589-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D255589

            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@FreeBSD.org
          Reporter: adridg@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 -- th=
at's
nominally a build-system problem for the port in question, but strip(1)
shouldn't be leaving spare files around anyway.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-255589-227>