[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #53201] Target runs incorrect command when shebang line exceeds ker

From: Paul D. Smith
Subject: [bug #53201] Target runs incorrect command when shebang line exceeds kernel limit
Date: Sun, 8 Apr 2018 18:57:29 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0

Follow-up Comment #4, bug #53201 (project make):

I don't understand the issue being reported.  It would be greatly illuminating
if you could provide an example of the extra-long shebang line for me to
examine.  I've tried for a bit to reproduce the problem and cannot.  It's not
clear from your report whether it's the path to the interpreter which is too
long, or whether it's an argument to the interpreter which is too long.

The situation cannot be as simple as you suggest.  First, the exec operation
that make invokes is in a forked process (obviously) so even if we were to try
to catch the ENOENT error, we couldn't do anything about it in the main make
process.  It doesn't know anything about failures during exec in its child
process (it only knows when the child process exits, whether it had an error
or not).

Second, make itself never tries to parse the shebang line in a script.  It
merely runs the program as provided to it.  Make uses the execvp() function in
the forked process to invoke the command and this function performs PATH
lookup then invokes execve() (according to the GNU/Linux man page, these
functions are wrappers around execve()).

If the way make is invoking processes and the way the shell invoke them are
different then I can only put it down to differences in the way that the shell
and the execvp() function in GNU libc treat interpreter scripts.  I'm not sure
I can see what GNU make should do about this difference.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]