[CMake] CMake memory exhaustion
Alan W. Irwin
irwin at beluga.phys.uvic.ca
Thu Jul 19 17:15:12 EDT 2007
On 2007-07-19 16:29-0400 Bill Hoffman wrote:
>> However, this is a really clumsy workaround so, Bill, can you recommend a
>> 2.4.7 fix I can test?
> You could try messing around with these values, in
> cmCommandArgumentParser.cxx:
>
>
> /* YYINITDEPTH -- initial size of the parser's stacks. */
> #ifndef YYINITDEPTH
> # define YYINITDEPTH 200
> #endif
>
> /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
> if the built-in stack extension method is used).
>
> Do not make this value too large; the results are undefined if
> YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
> evaluated with infinite-precision integer arithmetic. */
>
> #ifndef YYMAXDEPTH
> # define YYMAXDEPTH 10000
> #endif
Thanks, Bill, for that hint. I uncommented values others had obviously used
before me near the top of that file.
#define YYMAXDEPTH 100000
#define YYINITDEPTH 10000
That's a factor of 10 increase in YYMAXDEPTH and factor of 50 increase in
YYINITDEPTH.
With those generous values everything worked like a charm (i.e. a small
tarball was generated) with no editing of the generated
CPackSourceConfig.cmake required.
Is there is some reason the above generous values don't work on all
platforms? If so, you should configure them to be used whenever possible.
Otherwise, others who are trying to use CPACK_SOURCE_IGNORE_FILES to beat
the dirty source tree problem when creating a source distribution will run
into the same memory exhaustion problem that I did at an effective limit of
30 to 60 regex's.
Is this a no-brainer change that will be done immediately or should I file a
formal bug report about the values of YYMAXDEPTH and YYINITDEPTH that are
not generous enough in 2.4.7?
Alan
__________________________
Alan W. Irwin
Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).
Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________
Linux-powered Science
__________________________
More information about the CMake
mailing list