On Tue, 20 May 2025 at 16:53, Alex Bennée <alex.ben...@linaro.org> wrote: > > Michael Tokarev <m...@tls.msk.ru> writes: > > > 07.02.2025 18:31, Alex Bennée wrote: > >> From: Ilya Leoshkevich <i...@linux.ibm.com> > >> In case an emulated process execve()s another emulated process, > >> bind() > >> will fail, because the socket already exists. So try deleting it. Use > >> the existing unix_listen() function which does this. Link qemu-user > >> with qemu-sockets.c and add the monitor_get_fd() stub. > >> Note that it is not possible to handle this in do_execv(): deleting > >> gdbserver_user_state.socket_path before safe_execve() is not correct, > >> because the latter may fail, and afterwards we may lose control. > > > > Please note: this is linux-user stuff, which is usually linked statically. > > By linking it with qemu-sockets, we basically broke static linking, because > > qemu-sockets uses getaddrinfo() &Co. The previous code, I think, was there > > for a reason, - to avoid this linkage. > > Oops, how come we didn't notice? We do have a bunch of --static targets > in the CI.
We ignore these warnings because upstream glib means we always have a bunch of false positives when we link a static qemu-user executable. So this one (which is in our own code, not in glib) slipped through. I think it's in the same "annoying noise" category as the glib ones, because the unix_listen() function won't actually end up in a call to getaddrinfo(). But since this one's in our own code we ought to fix it, either by splitting the source file or by reverting the commit. thanks -- PMM