[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:50:39 UTC 2021
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255589
Adriaan de Groot <adridg at freebsd.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |crees at FreeBSD.org
--- Comment #1 from Adriaan de Groot <adridg at freebsd.org> ---
I'm *fairly* sure this was introduced in upstream
https://sourceforge.net/p/elftoolchain/code/3919/ and that it needs cleanup to
remove the tempfile on the error-exit path with unrecognized input, something
like this:
```
switch (elf_kind(ecp->ein)) {
case ELF_K_NONE:
if (tempfile != NULL) {
if (unlink(tempfile) < 0)
err(EXIT_FAILURE, "unlink %s failed",
tempfile);
free(tempfile);
}
errx(EXIT_FAILURE, "file format not recognized");
```
Adding crees@ as upstream-involved.
In the meantime, ports are getting cruft like `${RM}
${STAGEDIR}${LOCALBASE}/bin/ecp.*` to clean up after strip(1).
Note that you don't need to use a full path for the strip command; soemthing
like `strip *.png` will bail out on the first png file and leave a single
`ecp.<random>` file in the current directory.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list