[Bug libstdc++/23734] [4.1 Regression] make[4]: execvp: /usr/local/bin/bash: Arg list too long

dave at hiauly1 dot hia dot nrc dot ca gcc-bugzilla@gcc.gnu.org
Wed Sep 7 01:02:00 GMT 2005


------- Additional Comments From dave at hiauly1 dot hia dot nrc dot ca  2005-09-07 01:01 -------
Subject: Re:  [4.1 Regression] make[4]: execvp: /usr/local/bin/bash: Arg list too long

> It looks like there are some patches to increase ARG_MAX on HP-UX 10.* OS
> releases.  They might provide a workaround.
> 
> >From HP Chart/bug report JAGaa11744:
> 
> A patch has been provided which will allow the kernel to 
> accept upto 200k chars (as the max combined size of arg/env
> strings) in a single call to EXEC.
> 
> The patch ids are:	PHKL_8282	(700 series)
> 			PHKL_8283	(800 series)
> 
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> 
> The following patches extend the maximum combined size of
> arg/env strings to 2048000 bytes (including the null
> terminators) in a single call to EXEC.
> 
> The patch ids are:	PHKL_10176	(10.20 S700)
> 		 	PHKL_10177	(10.20 S800)
> 
> 			PHKL_10270      (10.10 S700)
> 			PHKL_10271      (10.10 S800)

I have PHKL_16750 installed which superceded PHKL_10176.  It claims
the following:

        The internal buffer within the kernel was created with a
	length of 20480 bytes, with no provision for increasing its
	size.  This patch provides for up to 100 such buffers, with
	all but the first allocated only if required (that is, if
	more than 20480 bytes of argv/env information is found).
        Thus, exec() now supports up to 2048000 bytes of argv/env
	information.

I tried the following:

#include <unistd.h>
int
main ()
{
  printf ("arg_max = %u\n", sysconf (_SC_ARG_MAX));
  return 0;
}

bash-3.00$ ./arg_max
arg_max = 20478

Thus, system is advertising that it supports 2048000 bytes of argv/env
info.  Looking at PHKL_16750, I see that I need to enable large_ncargs_enabled.
I'm going to give this a try.

Dave


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23734



More information about the Gcc-bugs mailing list