[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: David Boyce
Subject: [bug #53201] Target runs incorrect command when shebang line exceeds kernel limit
Date: Wed, 21 Feb 2018 08:06:40 -0500 (EST)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36

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

I think a couple of facts here may need correcting though the issue is quite
real. I suspect you are not running into a kernel limit since modern Linux
kernels have no such limit (at one time the limit was 131K, then doubled to
262K, then removed altogether). However, the mere fact that the kernel imposes
no limit doesn't mean individual utilities, in particular the shell, have the
same property.

Most likely the limit being exceeded belongs to bash. The so-called fast-path
optimization in make skips the shell and execs the recipe directly if it
contains no shell special characters, thus in your original test case the
shell isn't used which explains the variance. Use of .ONESHELL suppresses
fast-path causing the shell to come back in and fail properly.

There are other ways of suppressing fast path to test this thesis; try
appending a semicolon to the recipe line or overriding the SHELL variable. One
of my favorite tricks is SHELL=//bin/sh which addresses the same executable
while convincing make it's different, thus disabling fast path.

I have no wisdom to offer regarding the fix. Your solution sounds fine but
that belongs to Paul.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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