On Wed, Mar 22, 2023 at 03:07:01PM -0500, Eric Blake wrote:
On Wed, Mar 22, 2023 at 04:53:42PM +0100, Laszlo Ersek wrote:
> The solution is that glibc *too* has a bug, and that bug hides the busybox bug.
Namely, in glibc, going back to historical commit
>
> commit 6a032d81581978187f562e5533a32e0a6a3d352b (tag: cvs/libc-960210)
>
> In other words, the original argv[0] is not preserved, but is replaced by <shell
path>. (Look for _PATH_BSHELL in said historical glibc commit, and also in today's
glibc file "posix/execvpe.c".)
Aside - what a funny filename, since execvpe() is a glibc extension
not in POSIX ;)
I've now filed a bug report to the Austin Group:
https://www.austingroupbugs.net/view.php?id=1645 And while researching
for that, I found that FreeBSD had the same bug up until 2020:
https://cgit.freebsd.org/src/commit/?id=301cb491ea
On the other hand, the fact that FreeBSD changed and didn't suffer an
immediate backlash of breaking programs means that glibc might
consider such a change, despite the length of the history it would be
changing. So I'll also file a bug to glibc as part of my efforts.
The glibc bug is now filed:
https://sourceware.org/bugzilla/show_bug.cgi?id=30262
And while doing all this, I also spotted another (unrelated) bug in
POSIX: Issue 8 will be moving to C17, which introduces
at_quick_exit(); the exec page needs an update to match that (hmm -
the draft 3 document I submitted this against is not yet public, but
it's coming Real Soon Now (tm)).
https://www.austingroupbugs.net/view.php?id=1646
(And I've been using C99 for so long that I was unaware of C17's
at_quick_exit() before this week)
What a busy day, filing bugs against multiple projects!
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization:
qemu.org |
libvirt.org