Date: Tue, 04 May 2021 10:50:38 +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-PpJUavj0pm@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-255589-227@https.bugs.freebsd.org/bugzilla/> References: <bug-255589-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D255589 Adriaan de Groot <adridg@freebsd.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |crees@FreeBSD.org --- Comment #1 from Adriaan de Groot <adridg@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, somethi= ng like this: ``` switch (elf_kind(ecp->ein)) { case ELF_K_NONE: if (tempfile !=3D 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. --=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-PpJUavj0pm>