Hello, A hard coded instance of /bin/sh was discovered in GDB while running the test suite of ldc using Guix: file: gdb/ser-pipe.c static int pipe_open (struct serial *scb, const char *name) [...] } close_most_fds (); execl ("/bin/sh", "sh", "-c", name, (char *) 0); _exit (127); } This contrasts with the rest of the code which carefully looks 'sh' from the PATH or SHELL variables.
https://sourceware.org/pipermail/gdb-patches/2021-September/182186.html
The master branch has been updated by Sergio Durigan Junior <sergiodj@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=906e2b7664c5becfa3e10717a7d530e87fdab4ec commit 906e2b7664c5becfa3e10717a7d530e87fdab4ec Author: Sergio Durigan Junior <sergiodj@sergiodj.net> Date: Sat Sep 25 17:27:23 2021 -0400 [PR gdb/28369] Use get_shell on gdb/ser-pipe.c PR gdb/28369 reports that gdb/ser-pipe.c has an 'execl' function call with a hard-coded "/bin/sh" as its argument. We've had 'get_shell' for a while now, which is conscious about the SHELL environment and a better alternative to always calling "/bin/sh". Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28369
This has been fixed.