[Bugme-janitors] [Bug 10095] Kernel does not honour _ARG_MAX when computing size of argp+envp in execve'd new process image.

bugme-daemon at bugzilla.kernel.org bugme-daemon at bugzilla.kernel.org
Mon Feb 25 10:22:36 PST 2008


http://bugzilla.kernel.org/show_bug.cgi?id=10095





------- Comment #2 from a.p.zijlstra at chello.nl  2008-02-25 10:22 -------

This is a rather silly bug.

 - Firstly, the test program is actually wrong, because it should also
calculate the env size.
 - Secondly, the limit ARG_MAX is a tad useless now that its variable.
There isn't a single good value, and the requirement for sysconf()
values to be constant during a process make it impossible to return the
actual number.
 - Thirdly, since the env and arg arrays are on the stack, and you limit
the stack to less than the given number, its arguable correct to fail.

I would propose to make sysconf(_SC_ARG_MAX) return _POSIX_MAX_ARG
(4096) and allow for the one page. This ought to discourage its use -
like the man page already does.


-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the Bugme-janitors mailing list