bug-make
[Top][All Lists]
Advanced

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

[bug #45763] Split args along MAX_ARG_STRLEN for linux/posix


From: Mike Crowe
Subject: [bug #45763] Split args along MAX_ARG_STRLEN for linux/posix
Date: Wed, 25 Nov 2020 12:42:39 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36

Follow-up Comment #3, bug #45763 (project make):

I've attempted to update the patch so that it compiles successfully on current
master and added a test. Commit message follows:
--8<--
When presented with a very long command line (as is common when linking
a large number of files with absolute paths in a deep subdirectory),
make fails to execute the command as it doesn't split the command line
to fit within the limits.

This is based on a fix for Debian bug 688601[1] by Adam Conrad applied
by Manoj Srivastava originally applied for Debian make-dfsg 4.0-5 in
2014 but dropped in 2018 (it seems under the incorrect assumption that
it had been accepted upstream.)

I've tweaked Adam's original patch so that it compiles successfully with
-Werror on top of current master. This required:

* moving the eval_line declaration to the top of the block, so I moved
  the macros too
* using a const variable when iterating over the shell
* adding a cast to avoid a signed/unsigned mismatch.

As suggested in the Savannah bug report[2], I've added a test case that
fails without the rest of the patch. I'm not sure what the consequences
of running the test on non-POSIX targets would be and whether it needs
marking as an expected failure.

* src/job.c (construct_command_argv_internal): support running commands
longer than MAX_ARG_STRLEN
* tests/scripts/features/long_command_line: add test for such a command
* configure.ac: check for now-required sys/user.h and linux/binfmts.h
headers

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=688601
[2] https://savannah.gnu.org/bugs/?45763#comment2


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?45763>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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