[Top][All Lists]

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

[bug #44853] gmake: execvp: bash: The parameter or environment lists are

From: Daniel Richard G.
Subject: [bug #44853] gmake: execvp: bash: The parameter or environment lists are too long.
Date: Fri, 22 May 2015 15:56:36 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36

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

I've confirmed that the problem is a too-large argument to "$SHELL -c". The
execvp() call is failing with E2BIG.

I've put together a workaround hack for this issue. A patch against git master
is attached (which also applies to 4.1).

This adds a handler for E2BIG in exec_command(). The error occurs when

    argv[0] == $SHELL
    argv[1] == "-c"
    argv[2] == "way too much shell code"

so it writes argv[2] to a temporary file, and then calls exec_command()
recursively to invoke

    argv[0] == $SHELL
    argv[1] == "/tmp/gmake-e2big.XXXXXX"

This is only a quick-and-dirty hack, however, because (1) the temp file is not
cleaned up, as exec_command() does not return, and (2) the code only works in
the specific case of a "$SHELL -c '...'" invocation rather than generally.

A real fix may require changes outside of exec_command(), in the places where
the exec argument vector is constructed to begin with.

(file #34079)

Additional Item Attachment:

File name: make-e2big-hack.patch          Size:0 KB


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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