Notes |
|
(0035748)
|
Brad King
|
2014-04-21 08:52
|
|
Thanks. Can you please provide a link to documentation describing the PAGE_SIZE*32 limit so it can be included in the commit message? |
|
|
(0035750)
|
Максим Прохоренко
|
2014-04-21 10:10
(edited on: 2014-04-21 10:14) |
|
|
|
(0035751)
|
Brad King
|
2014-04-21 10:33
|
|
Re 0014892:0035750: MAX_ARG_STRLEN appears to be about the longest allowed single argv[i] entry, not the overall command line length limit. They may happen to be the same in some cases.
For reference, the current logic came from here:
Ninja: also write link libraries to rsp file
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7f647cf5 [^]
According to the stackexchange link the value returned by sysconf(_SC_ARG_MAX) may depend on the current process stack size rather than being a system-wide limit of the OS. The size in the cmake process may be different than in the ninja process that actually launches the command line.
Perhaps ninja needs a way to ask for the max command line length it can run without a response file. |
|
|
(0035753)
|
Максим Прохоренко
|
2014-04-21 13:23
|
|
|
|
(0035754)
|
Peter Kuemmel
|
2014-04-21 13:51
|
|
http://www.in-ulm.de/~mascheck/various/argmax/ [^] :
And as additional limit since 2.6.23, one argument must not be longer than MAX_ARG_STRLEN (131072).
This might become relevant if you generate a long call like "sh -c 'generated with long arguments'".
So I think not using ARG_MAX is the best way. |
|
|
(0035756)
|
Peter Kuemmel
|
2014-04-21 14:07
|
|
|
|
(0035757)
|
Brad King
|
2014-04-21 14:09
|
|
Re 0014892:0035756: Please extend the commit message to explain the rationale.
Perhaps the code should check both limits and take the smaller. |
|
|
(0037682)
|
Максим Прохоренко
|
2015-01-14 03:40
|
|
"sysconf(_SC_PAGESIZE) * 32" solve my problem
Can you add to 3.1? |
|
|
(0037809)
|
Brad King
|
2015-01-26 09:52
|
|
|
|
(0038859)
|
Robert Maynard
|
2015-06-01 08:38
|
|
Closing resolved issues that have not been updated in more than 4 months. |
|